projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/xz: fix XZ_DYNALLOC to avoid useless memory reallocations
[platform/kernel/linux-rpi.git]
/
lib
/
xz
/
xz_dec_lzma2.c
diff --git
a/lib/xz/xz_dec_lzma2.c
b/lib/xz/xz_dec_lzma2.c
index
08c3c80
..
156f26f
100644
(file)
--- a/
lib/xz/xz_dec_lzma2.c
+++ b/
lib/xz/xz_dec_lzma2.c
@@
-1146,6
+1146,7
@@
XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props)
if (DEC_IS_DYNALLOC(s->dict.mode)) {
if (s->dict.allocated < s->dict.size) {
+ s->dict.allocated = s->dict.size;
vfree(s->dict.buf);
s->dict.buf = vmalloc(s->dict.size);
if (s->dict.buf == NULL) {