Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e32634f5 authored by Liu ShuoX's avatar Liu ShuoX Committed by Tony Luck
Browse files

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: default avatarLiu ShuoX <shuox.liu@intel.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 017321cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -497,6 +497,7 @@ void pstore_get_records(int quiet)
							big_oops_buf_sz);
							big_oops_buf_sz);


			if (unzipped_len > 0) {
			if (unzipped_len > 0) {
				kfree(buf);
				buf = big_oops_buf;
				buf = big_oops_buf;
				size = unzipped_len;
				size = unzipped_len;
				compressed = false;
				compressed = false;