projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11a48a5
)
pstore/platform: fix potential mem leak if pstore_init_fs failed
author
chenqiwu
<chenqiwu@xiaomi.com>
Fri, 7 Feb 2020 09:46:39 +0000
(17:46 +0800)
committer
Kees Cook
<keescook@chromium.org>
Tue, 25 Feb 2020 19:13:18 +0000
(11:13 -0800)
There is a potential mem leak when pstore_init_fs failed,
since the pstore compression maybe unlikey to initialized
successfully. We must clean up the allocation once this
unlikey issue happens.
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Link:
https://lore.kernel.org/r/1581068800-13817-1-git-send-email-qiwuchen55@gmail.com
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/platform.c
patch
|
blob
|
history
diff --git
a/fs/pstore/platform.c
b/fs/pstore/platform.c
index
d896457
..
408277e
100644
(file)
--- a/
fs/pstore/platform.c
+++ b/
fs/pstore/platform.c
@@
-823,9
+823,9
@@
static int __init pstore_init(void)
ret = pstore_init_fs();
if (ret)
-
return ret
;
+
free_buf_for_compression()
;
- return
0
;
+ return
ret
;
}
late_initcall(pstore_init);