Changeset: a73238c4d015 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a73238c4d015 Modified Files: monetdb5/modules/atoms/json.c Branch: Jul2017 Log Message:
Better fix than 302a454e8a33: GDKstrdup could fail and then you have no error.
diffs (14 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,8 +42,9 @@
if (jt == NULL || jt->error) {
\
char *msg;
\
if (jt) {
\
- msg = GDKstrdup(jt->error);
\
+ msg = jt->error;
\
JSONfree(jt);
\
+ jt->error = NULL;
\
} else {
\
msg = createException(MAL, "json.new",
MAL_MALLOC_FAIL); \
}
\
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list
