[GRASS-SVN] r61423 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 28 03:56:33 PDT 2014


Author: mmetz
Date: 2014-07-28 03:56:33 -0700 (Mon, 28 Jul 2014)
New Revision: 61423

Modified:
   grass/trunk/lib/gis/flate.c
Log:
libgis: fix memory leak in G_zlib_compress()

Modified: grass/trunk/lib/gis/flate.c
===================================================================
--- grass/trunk/lib/gis/flate.c	2014-07-28 07:17:07 UTC (rev 61422)
+++ grass/trunk/lib/gis/flate.c	2014-07-28 10:56:33 UTC (rev 61423)
@@ -365,6 +365,7 @@
     nbytes = buf_sz - c_stream.avail_out;
     if (nbytes > dst_sz) {	/* Not enough room to copy output */
 	G_free(buf);
+	deflateEnd(&c_stream);
 	return -2;
     }
     /* Copy the data from buf to dst */



More information about the grass-commit mailing list