Changeset: d24c7462f786 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d24c7462f786
Modified Files:
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_session.c
Branch: malerrors
Log Message:

fix small leak(s)


diffs (37 lines):

diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -524,7 +524,8 @@ str runMALsequence(Client cntxt, MalBlkP
                pci = getInstrPtr(mb, stkpc);
                if (cntxt->mode == FINISHCLIENT){
                        stkpc = stoppc;
-                       ret= createException(MAL, "mal.interpreter", 
"prematurely stopped client");
+                       if (ret == NULL)
+                               ret= createException(MAL, "mal.interpreter", 
"prematurely stopped client");
                        break;
                }
                if (cntxt->itrace || mb->trap || stk->status) {
@@ -1187,7 +1188,7 @@ str runMALsequence(Client cntxt, MalBlkP
                                                strcat(new,"\n");
                                        strcat(new,"!");
                                        strcat(new,n);
-                                       //freeException(ret);
+                                       freeException(ret);
                                        ret = new;
                                }
                        }
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -714,8 +714,10 @@ MALengine(Client c)
                msg = (str) runMAL(c, prg->def, 0, c->glb);
        if (msg) {
                /* ignore "internal" exceptions */
-               if (strstr(msg, "client.quit") )
+               if (strstr(msg, "client.quit") ) {
+                       freeException(msg);
                        msg = MAL_SUCCEED;
+               }
        }
        MSresetVariables(c, prg->def, c->glb, 0);
        resetMalBlk(prg->def, 1);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to