diff --git a/src/lzsa.c b/src/lzsa.c index 4136d7d..939a2c9 100755 --- a/src/lzsa.c +++ b/src/lzsa.c @@ -277,8 +277,10 @@ int comparestream_open(lzsa_stream_t *stream, const char *pszCompareFilename, co stream->close = comparestream_close; return 0; } - else + else { + free(pCompareStream); return -1; + } } static int do_compare(const char *pszInFilename, const char *pszOutFilename, const char *pszDictionaryFilename, const unsigned int nOptions, int nFormatVersion) {