Skip to content

Commit

Permalink
[bug] fix lzma memory leakage, NeuroJSON/zmat#11, lloyd/easylzma#4
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 18, 2024
1 parent 5cc92ab commit 17e347c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zmat/zmatlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,8 @@ simpleCompress(elzma_file_format format, const unsigned char* inData,
*outLen = ds.outLen;
}

elzma_compress_free(&hand);

return rc;
}

Expand Down Expand Up @@ -1009,6 +1011,8 @@ simpleDecompress(elzma_file_format format, const unsigned char* inData,
return rc;
}

elzma_decompress_free(&hand);

*outData = ds.outData;
*outLen = ds.outLen;
}
Expand Down

0 comments on commit 17e347c

Please sign in to comment.