Changeset: d0cb14139aba for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0cb14139aba
Modified Files:
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_runtime.c
Branch: default
Log Message:

fix out of memory issue


diffs (33 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
@@ -176,7 +176,7 @@ renderProfilerEvent(Client cntxt, MalBlk
        if( pci->token < FCNcall || pci->token > PATcall)
                logadd(",\"operator\":\"%s\"", operatorName(pci->token));
        if (!GDKinmemory() && !GDKembedded()) {
-               char *uuid;
+               char *uuid = NULL;
                str c;
                if ((c = msab_getUUID(&uuid)) == NULL) {
                        logadd(",\"session\":\"%s\"", uuid);
@@ -394,7 +394,7 @@ profilerHeartbeatEvent(char *alter)
        lognew();
        logadd("{"); // fill in later with the event counter
        if (!GDKinmemory() && !GDKembedded()) {
-               char *uuid, *err;
+               char *uuid = NULL, *err;
                if ((err = msab_getUUID(&uuid)) == NULL) {
                        logadd("\"session\":\"%s\",", uuid);
                        free(uuid);
diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c
--- a/monetdb5/mal/mal_runtime.c
+++ b/monetdb5/mal/mal_runtime.c
@@ -177,7 +177,7 @@ runtimeProfileInit(Client cntxt, MalBlkP
        QRYqueue[qhead].start = time(0);
        q = isaSQLquery(mb);
        QRYqueue[qhead].query = q? GDKstrdup(q):0;
-       if(QRYqueue[i].username)
+       if(QRYqueue[qhead].username)
                GDKfree(QRYqueue[qhead].username);
        if (!GDKembedded())
                AUTHgetUsername(&QRYqueue[qhead].username, cntxt);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to