Changeset: 5c43b0856685 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5c43b0856685
Modified Files:
        monetdb5/mal/mal_profiler.c
        sql/backends/monet5/wlr.c
Branch: Jul2021
Log Message:

Don't leak


diffs (25 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
@@ -841,6 +841,7 @@ sqlProfilerEvent(Client cntxt, MalBlkPtr
        MT_lock_set(&mal_profileLock);
        if (cntxt->profticks == NULL) {
                MT_lock_unset(&mal_profileLock);
+               GDKfree(stmt);
                return;
        }
        errors += BUNappend(cntxt->profticks, &pci->ticks, false) != 
GDK_SUCCEED;
diff --git a/sql/backends/monet5/wlr.c b/sql/backends/monet5/wlr.c
--- a/sql/backends/monet5/wlr.c
+++ b/sql/backends/monet5/wlr.c
@@ -320,7 +320,9 @@ WLRprocessBatch(Client cntxt)
                        }
                        q= getInstrPtr(mb, mb->stop - 1);
                        if( getModuleId(q) != wlrRef){
-                               msg =createException(MAL,"wlr.process", "batch 
%d:improper wlr instruction: %s\n", i, instruction2str(mb,0, q, LIST_MAL_CALL));
+                               char *s = instruction2str(mb,0, q, 
LIST_MAL_CALL);
+                               msg = createException(MAL,"wlr.process", "batch 
%d:improper wlr instruction: %s\n", i, s);
+                               GDKfree(s);
                                cleanup();
                                break;
                        }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to