Merge pull request #3059 from akallabeth/zlib_memleak_fix
Fix memory leak in lodepng_zlib_compress
This commit is contained in:
commit
07d5d1615b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user