Changeset: 804fc71c85b4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/804fc71c85b4
Modified Files:
        monetdb5/mal/mal_instruction.c
        sql/server/sql_mvc.c
Branch: Dec2025
Log Message:

Fix some memory leaks that wree introduced by removing parent allocators.


diffs (27 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -296,6 +296,8 @@ freeMalBlk(MalBlkPtr mb)
        //      if (isVarConstant(mb, i))
        //              VALclear(&getVarConstant(mb, i));
        //}
+       /* destrou instr_allocator first since *mb is allocated on mb->ma */
+       ma_destroy(mb->instr_allocator);
        ma_destroy(mb->ma);
 #if 0
        mb->vtop = 0;
diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -872,7 +872,10 @@ mvc_destroy(mvc *m)
        if (m->scanner.log) /* close and destroy stream */
                close_stream(m->scanner.log);
 
-       m->sa = NULL;
+       if (m->sa) {
+               ma_destroy(m->sa);
+               m->sa = NULL;
+       }
        if (m->qc)
                qc_destroy(m->qc);
        m->qc = NULL;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to