Changeset: 302a454e8a33 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=302a454e8a33
Modified Files:
        monetdb5/modules/atoms/json.c
Branch: Jul2017
Log Message:

Use GDKstrdup to avoid freeing the JSON parse error message twice


diffs (12 lines):

diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -42,7 +42,7 @@
        if (jt == NULL || jt->error) {                                          
                                \
                char *msg;                                                      
                                                        \
                if (jt) {                                                       
                                                        \
-                       msg = jt->error;                                        
                                                \
+                       msg = GDKstrdup(jt->error);                             
                                        \
                        JSONfree(jt);                                           
                                                \
                } else {                                                        
                                                        \
                        msg = createException(MAL, "json.new", 
MAL_MALLOC_FAIL);        \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to