Update of /cvsroot/monetdb/pathfinder/compiler/xmlimport
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8752
Modified Files:
Tag: Nov2009
xml2lalg_converters.c
Log Message:
Fix memory leak.
Found by Coverity.
Index: xml2lalg_converters.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/xmlimport/xml2lalg_converters.c,v
retrieving revision 1.31.4.1
retrieving revision 1.31.4.2
diff -u -d -r1.31.4.1 -r1.31.4.2
--- xml2lalg_converters.c 7 Oct 2009 13:48:32 -0000 1.31.4.1
+++ xml2lalg_converters.c 7 Dec 2009 12:29:50 -0000 1.31.4.2
@@ -192,6 +192,7 @@
char *idString = NULL;
PFalg_col_t ori = col_NULL;
unsigned int length = 0;
+ PFalg_col_t rv;
if (PFstrUtils_beginsWith(s, "iter")) {
ori = col_iter;
@@ -219,9 +220,11 @@
idString = PFstrUtils_substring (s + length, s + strlen(s));
if (idString[0] == '0')
- return PFcol_new_fixed (ori, 0);
+ rv = PFcol_new_fixed (ori, 0);
else
- return PFcol_new_fixed (ori, atoi (idString));
+ rv = PFcol_new_fixed (ori, atoi (idString));
+ free(idString);
+ return rv;
}
/**
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins