提交 e32634f5 编写于 作者: L Liu ShuoX 提交者: Tony Luck

pstore: Fix memory leak when decompress using big_oops_buf

After sucessful decompressing, the buffer which pointed by 'buf' will be
lost as 'buf' is overwrite by 'big_oops_buf' and will never be freed.
Signed-off-by: NLiu ShuoX <shuox.liu@intel.com>
Acked-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 017321cf
......@@ -497,6 +497,7 @@ void pstore_get_records(int quiet)
big_oops_buf_sz);
if (unzipped_len > 0) {
kfree(buf);
buf = big_oops_buf;
size = unzipped_len;
compressed = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册