Minor memleak clean ups on failures.

This commit is contained in:
Con Kolivas 2018-05-28 14:39:26 +10:00
parent 907b66b8cb
commit 3cadc63e39

View file

@ -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;
} }