xz: Call lzma_end(&strm) before exiting if debugging is enabled.
This commit is contained in:
parent
bd432015d3
commit
1ef3cf44a8
|
@ -698,3 +698,13 @@ coder_run(const char *filename)
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
extern void
|
||||
coder_free(void)
|
||||
{
|
||||
lzma_end(&strm);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -65,3 +65,8 @@ extern void coder_set_compression_settings(void);
|
|||
|
||||
/// Compress or decompress the given file
|
||||
extern void coder_run(const char *filename);
|
||||
|
||||
#ifndef NDEBUG
|
||||
/// Free the memory allocated for the coder and kill the worker threads.
|
||||
extern void coder_free(void);
|
||||
#endif
|
||||
|
|
|
@ -275,6 +275,10 @@ main(int argc, char **argv)
|
|||
list_totals();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
coder_free();
|
||||
#endif
|
||||
|
||||
// If we have got a signal, raise it to kill the program instead
|
||||
// of calling tuklib_exit().
|
||||
signals_exit();
|
||||
|
|
Loading…
Reference in New Issue