Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv545/src/backends/monet5
Modified Files:
Tag: SQL_2-20
sql_scenario.mx
Log Message:
fix 2 memory leaks.
1) leak of arguments in SQLexecutePrepared
2) also sql/mvc variable stack was never freed
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.277.2.4
retrieving revision 1.277.2.5
diff -u -d -r1.277.2.4 -r1.277.2.5
--- sql_scenario.mx 21 Oct 2007 16:48:15 -0000 1.277.2.4
+++ sql_scenario.mx 26 Oct 2007 20:36:11 -0000 1.277.2.5
@@ -1132,7 +1132,7 @@
{
mvc *c = be->mvc;
int argc, parc;
- ValPtr *argv, argvbuffer[MAXARG];
+ ValPtr *argv, argvbuffer[MAXARG], v;
ValRecord *argrec, argrecbuffer[MAXARG];
MalBlkPtr mb;
MalStkPtr glb;
@@ -1187,6 +1187,12 @@
}
glb = (MalStkPtr)(q->stk);
ret= callMAL(cntxt,mb, &glb, argv, (c->mode == m_debug?'n':0));
+ /* cleanup the arguments */
+ for(i=pci->retc; i<pci->argc; i++) {
+ garbageElement(v= &glb->stk[pci->argv[i]]);
+ v->vtype= TYPE_int;
+ v->val.ival= int_nil;
+ }
q->stk = (backend_stack)glb;
if( pci->argc >= MAXARG)
GDKfree(argv);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins