projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
017321c
)
pstore: Fix memory leak when decompress using big_oops_buf
author
Liu ShuoX
<shuox.liu@intel.com>
Wed, 12 Mar 2014 13:34:06 +0000
(21:34 +0800)
committer
Tony Luck
<tony.luck@intel.com>
Mon, 17 Mar 2014 21:14:03 +0000
(14:14 -0700)
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: Liu ShuoX <shuox.liu@intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/platform.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/pstore/platform.c
b/fs/pstore/platform.c
index 78c3c2097787a1be2ea2bd1757a6c6e5554df72c..46d269e3870652104f2f4b2d52d6643a9250b15b 100644
(file)
--- a/
fs/pstore/platform.c
+++ b/
fs/pstore/platform.c
@@
-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;