Changeset: 9d182db0ff1c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9d182db0ff1c
Modified Files:
monetdb5/mal/mal_profiler.c
Branch: sql_profiler
Log Message:
Handle NULL value.
diffs (14 lines):
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -194,8 +194,8 @@ prepareNonMalEvent(Client cntxt, enum ev
int sessionid = cntxt->idx;
if (cntxt->curprg)
tag = &cntxt->curprg->def->tag;
- if (cntxt->query)
- query = mal_quote(cntxt->query, strlen(cntxt->query));
+ if (cntxt->query && ( query = mal_quote(cntxt->query,
strlen(cntxt->query)) ) == NULL)
+ return NULL;
if (!logadd(&logbuf, "{\"sessionid\":\"%d\"", sessionid))
goto cleanup_and_exit;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]