diff --git a/libretro-common/file/file_extract.c b/libretro-common/file/file_extract.c index 6dd267fb15..e325d10cbd 100644 --- a/libretro-common/file/file_extract.c +++ b/libretro-common/file/file_extract.c @@ -448,7 +448,10 @@ int zlib_inflate_data_to_file(zlib_file_handle_t *handle, const uint8_t *cdata, uint32_t csize, uint32_t size, uint32_t checksum) { if (handle) + { zlib_stream_free(handle->stream); + free(handle->stream); + } if (!handle || ret == -1) {