mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
ppmd: fix memory leak (#1030)
This commit is contained in:
parent
0bc12cea19
commit
dc8531deb7
1 changed files with 3 additions and 1 deletions
|
|
@ -284,8 +284,10 @@ int32_t mz_stream_ppmd_open(void *stream, const char *path, int32_t mode) {
|
|||
if (!Ppmd8_Alloc(&ppmd->ppmd8, mem_size, &ppmd->allocator))
|
||||
return MZ_STREAM_ERROR;
|
||||
|
||||
if (!Ppmd8_Init_RangeDec(&ppmd->ppmd8))
|
||||
if (!Ppmd8_Init_RangeDec(&ppmd->ppmd8)) {
|
||||
Ppmd8_Free(&ppmd->ppmd8, &ppmd->allocator);
|
||||
return MZ_STREAM_ERROR;
|
||||
}
|
||||
|
||||
Ppmd8_Init(&ppmd->ppmd8, order, restor);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue