Changeset: 9b064a8f018b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b064a8f018b
Modified Files:
        monetdb5/mal/mal_recycle.c
Branch: Jun2016
Log Message:

Memory leak.
And silly cast.


diffs (29 lines):

diff --git a/monetdb5/mal/mal_recycle.c b/monetdb5/mal/mal_recycle.c
--- a/monetdb5/mal/mal_recycle.c
+++ b/monetdb5/mal/mal_recycle.c
@@ -424,6 +424,8 @@ RECYCLEkeep(Client cntxt, MalBlkPtr mb, 
                        c = fndConstant(recycleBlk, &cst, recycleBlk->vtop);
                        if (c<0)
                                c = defConstant(recycleBlk, v->vtype, &cst);
+                       else
+                               VALclear(&cst);
                } else {
                        c = newTmpVariable(recycleBlk, v->vtype);
                        setVarConstant(recycleBlk, c);
@@ -434,6 +436,7 @@ RECYCLEkeep(Client cntxt, MalBlkPtr mb, 
                                clrVarCleanup(recycleBlk, c);
                        v = &getVarConstant(recycleBlk, c);
                        VALcopy(v,&cst);
+                       VALclear(&cst);
                }
                if (v->vtype == TYPE_bat)
                        BBPincref( *(const int*)VALptr(v), TRUE);
@@ -864,7 +867,7 @@ RECYCLEexit(Client cntxt, MalBlkPtr mb, 
 
        /* infinite case, admit all new instructions */
        if (RECYCLEfind(cntxt,mb,stk,p)<0 )
-               (void) RECYCLEkeep(cntxt,mb, stk, p, prof);
+               RECYCLEkeep(cntxt,mb, stk, p, prof);
        recycleSearchTime += GDKusec()-clk;
        recycleSearchCalls++;
        MT_lock_unset(&recycleLock);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to