Merge pull request #3059 from akallabeth/zlib_memleak_fix

Fix memory leak in lodepng_zlib_compress
This commit is contained in:
Martin Fleisz 2016-01-19 09:27:50 +01:00
commit 07d5d1615b

View File

@ -2208,6 +2208,12 @@ unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsig
*out = outv.data;
*outsize = outv.size;
}
else
{
*out = NULL;
*outsize = 0;
ucvector_cleanup(&outv);
}
return error;
}