(RPNG) Free zlib stream

This commit is contained in:
Higor Eurípedes 2015-04-25 21:04:52 -03:00
parent 1532ab3a58
commit c432811436
2 changed files with 5 additions and 0 deletions

View File

@ -280,5 +280,8 @@ end:
free(*data);
free(rpng.idat_buf.data);
free(rpng.process.inflate_buf);
if (rpng.process.stream)
zlib_stream_free(rpng.process.stream);
return ret;
}

View File

@ -221,6 +221,8 @@ void rpng_nbio_load_image_free(struct rpng_t *rpng)
free(rpng->idat_buf.data);
if (rpng->process.inflate_buf)
free(rpng->process.inflate_buf);
if (rpng->process.stream)
zlib_stream_free(rpng->process.stream);
if (rpng)
free(rpng);