Changeset: 211cd02883c7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/211cd02883c7
Modified Files:
        gdk/gdk_heap.c
Branch: Aug2024
Log Message:

Fix a potential leak.


diffs (19 lines):

diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -198,6 +198,7 @@ HEAPalloc(Heap *h, size_t nitems, size_t
                        sz += size;
                        if (qc->maxmem > 0 && sz > qc->maxmem) {
                                ATOMIC_SUB(&qc->datasize, size);
+                               GDKfree(nme);
                                GDKerror("Query using too much memory.\n");
                                return GDK_FAIL;
                        }
@@ -293,6 +294,7 @@ HEAPextend(Heap *h, size_t size, bool ma
                        if (qc->maxmem > 0 && sz > qc->maxmem) {
                                GDKerror("Query using too much memory.\n");
                                ATOMIC_SUB(&qc->datasize, xsize);
+                               GDKfree(path);
                                return GDK_FAIL;
                        }
                }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to