]> git.baikalelectronics.ru Git - kernel.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)
committerKees Cook <keescook@chromium.org>
Tue, 25 Feb 2020 19:13:18 +0000 (11:13 -0800)
commit32827029a2fff2234609d049e4c2a1ddf32b978e
treeb8d5621a193cba199800996085be4ba096370dd9
parenta0dcdc4ca64230a6d4a2738a96d502ae7293732c
pstore/platform: fix potential mem leak if pstore_init_fs failed

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