Fixed memory leak.

This commit is contained in:
Armin Novak 2015-08-28 11:07:25 +02:00
parent 26b1f5a914
commit 5cad081cc8

View File

@ -116,7 +116,10 @@ int winpr_image_png_read_fp(wImage* image, FILE* fp)
return -1;
if (fread((void*) data, size, 1, fp) != 1)
{
free(data);
return -1;
}
lodepng_status = lodepng_decode32(&(image->data), &width, &height, data, size);