Changeset: 13b3e5ec243e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=13b3e5ec243e
Modified Files:
monetdb5/optimizer/opt_pushselect.c
Branch: Feb2013
Log Message:
Fix a memory leak.
diffs (24 lines):
diff --git a/monetdb5/optimizer/opt_pushselect.c
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -114,7 +114,7 @@ OPTpushselectImplementation(Client cntxt
mnstr_printf(cntxt->fdout,"#Push select optimizer started\n");
(void) stk;
(void) pci;
- vars= (int*) GDKmalloc(sizeof(int)* mb->vtop);
+ vars= (int*) GDKmalloc(sizeof(int)* mb->vtop);
limit = mb->stop;
slimit= mb->ssize;
old = mb->stmt;
@@ -130,8 +130,10 @@ OPTpushselectImplementation(Client cntxt
if (getModuleId(p) == algebraRef &&
(getFunctionId(p) == tintersectRef || getFunctionId(p)
== tinterRef ||
- getFunctionId(p) == tdifferenceRef || getFunctionId(p)
== tdiffRef))
+ getFunctionId(p) == tdifferenceRef || getFunctionId(p)
== tdiffRef)) {
+ GDKfree(vars);
return 0;
+ }
if (getModuleId(p) == algebraRef && getFunctionId(p) ==
sliceRef)
nr_topn++;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list