]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pstore/platform: fix potential mem leak if pstore_init_fs failed
authorchenqiwu <chenqiwu@xiaomi.com>
Fri, 7 Feb 2020 09:46:39 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:11:55 +0000 (16:11 +0200)
commit7ac1a5911758190a617487127a41ed058f9e7046
tree616628f10913558e28731bfc09c8e162d8ec60d6
parent77778dbc63a989ecce621954368b3462512958e3
pstore/platform: fix potential mem leak if pstore_init_fs failed

[ Upstream commit 8a57d6d4ddfa41c49014e20493152c41a38fcbf8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/pstore/platform.c