Changeset: 8296b6326e55 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8296b6326e55
Modified Files:
        monetdb5/mal/mal_exception.c
        monetdb5/mal/mal_parser.c
Branch: default
Log Message:

Fixed memory leak


diffs (23 lines):

diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -146,7 +146,6 @@ freeException(str msg)
                GDKfree(msg);
 }
 
-
 /**
  * Internal helper function for createMalException and
  * showScriptException such that they share the same code, because reuse
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -1461,6 +1461,8 @@ parseEnd(Client cntxt)
                msg = chkProgram(cntxt->usermodule, cntxt->curprg->def);
                if( errors == NULL)
                        errors = msg;
+               else
+                       freeException(msg);
                if (errors == NULL){
                        errors = cntxt->curprg->def->errors;
                        cntxt->curprg->def->errors=0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to