]> git.baikalelectronics.ru Git - kernel.git/commit
lib/xz: fix XZ_DYNALLOC to avoid useless memory reallocations
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 16 Nov 2019 01:34:39 +0000 (17:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Nov 2019 02:34:00 +0000 (18:34 -0800)
commitc9bb6b9267bde87673a81b4f354440d150c892b7
tree8e9a6ff8aea2fb572ba1a3e6b964ff9eb9f7efab
parentfc149a59ce9a9cb661c84e78412710ca9ea1070c
lib/xz: fix XZ_DYNALLOC to avoid useless memory reallocations

s->dict.allocated was initialized to 0 but never set after a successful
allocation, thus the code always thought that the dictionary buffer has
to be reallocated.

Link: http://lkml.kernel.org/r/20191104185107.3b6330df@tukaani.org
Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Reported-by: Yu Sun <yusun2@cisco.com>
Acked-by: Daniel Walker <danielwa@cisco.com>
Cc: "Yixia Si (yisi)" <yisi@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/xz/xz_dec_lzma2.c