mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Minor memleak clean ups on failures.
This commit is contained in:
parent
907b66b8cb
commit
3cadc63e39
8
stream.c
8
stream.c
|
|
@ -1653,11 +1653,13 @@ fill_another:
|
||||||
fatal_return(("Unable to malloc buffer of size %lld in fill_buffer\n", u_len), -1);
|
fatal_return(("Unable to malloc buffer of size %lld in fill_buffer\n", u_len), -1);
|
||||||
sinfo->ram_alloced += u_len;
|
sinfo->ram_alloced += u_len;
|
||||||
|
|
||||||
if (unlikely(read_buf(control, sinfo->fd, s_buf, padded_len)))
|
if (unlikely(read_buf(control, sinfo->fd, s_buf, padded_len))) {
|
||||||
|
dealloc(s_buf);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (ENCRYPT) {
|
if (unlikely(ENCRYPT && !lrz_decrypt(control, s_buf, padded_len, blocksalt))) {
|
||||||
if (unlikely(!lrz_decrypt(control, s_buf, padded_len, blocksalt)))
|
dealloc(s_buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue