]> git.baikalelectronics.ru Git - kernel.git/commit
pstore/ram: Fix error-path memory leak in persistent_ram_new() callers
authorKees Cook <keescook@chromium.org>
Mon, 30 Dec 2019 19:48:10 +0000 (11:48 -0800)
committerKees Cook <keescook@chromium.org>
Thu, 2 Jan 2020 20:30:39 +0000 (12:30 -0800)
commit37ff8c9e605c73c14fbb236c638c564f6fd9b128
tree51a54cdb8074c25a8a5aca178624e0542d649f7a
parent18ca123f6ebe35a17ec03d9d706c2e230bcf298a
pstore/ram: Fix error-path memory leak in persistent_ram_new() callers

For callers that allocated a label for persistent_ram_new(), if the call
fails, they must clean up the allocation.

Suggested-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Fixes: b083fdb51771 ("pstore/ram: Clarify resource reservation labels")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/lkml/20191211191353.14385-1-navid.emamdoost@gmail.com
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c