Fix memory leak in lodepng_zlib_compress

This commit is contained in:
Armin Novak 2016-01-15 10:16:08 +01:00
parent 2db8c7e107
commit d2ab27626a
1 changed files with 6 additions and 0 deletions

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;
}