Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17600/src/mapiclient
Modified Files:
MapiClient.mx
Log Message:
don't leak memory
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- MapiClient.mx 13 Dec 2007 15:44:24 -0000 1.96
+++ MapiClient.mx 13 Dec 2007 18:35:21 -0000 1.97
@@ -1224,6 +1224,8 @@
fflush(stdout);
}
#endif
+ if (buf != oldbuf)
+ free(buf);
buf = oldbuf;
line = fgets(buf, BUFSIZ, fp);
}
@@ -1237,7 +1239,7 @@
line = to;
iconv(cd_in, &from, &fromlen, &to, &tolen);
*to = 0;
- if (oldbuf)
+ if (!oldbuf)
free(buf);
buf = line;
}
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins