mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Fix large memleak in decompression when output does not go to stdout. Same sort of logic already exists in compression.
This commit is contained in:
parent
6e0016daf7
commit
1510f4a26a
4
lrzip.c
4
lrzip.c
|
|
@ -788,6 +788,7 @@ bool decompress_file(rzip_control *control)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( STDOUT )
|
||||||
if (unlikely(!open_tmpoutbuf(control)))
|
if (unlikely(!open_tmpoutbuf(control)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -845,6 +846,9 @@ bool decompress_file(rzip_control *control)
|
||||||
else
|
else
|
||||||
print_progress("[OK] \n");
|
print_progress("[OK] \n");
|
||||||
|
|
||||||
|
if (TMP_OUTBUF)
|
||||||
|
close_tmpoutbuf(control);
|
||||||
|
|
||||||
if (fd_out > 0) {
|
if (fd_out > 0) {
|
||||||
if (unlikely(close(fd_hist) || close(fd_out)))
|
if (unlikely(close(fd_hist) || close(fd_out)))
|
||||||
fatal_return(("Failed to close files\n"), false);
|
fatal_return(("Failed to close files\n"), false);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue