]> git.baikalelectronics.ru Git - kernel.git/commit
pstore/ram: Avoid allocation and leak of platform data
authorKees Cook <keescook@chromium.org>
Sun, 20 Jan 2019 22:33:34 +0000 (14:33 -0800)
committerKees Cook <keescook@chromium.org>
Sun, 20 Jan 2019 22:44:52 +0000 (14:44 -0800)
commite04bc22f9509a39e741f675cb20c261a707ec032
tree4c5723127cca25af506b0edc6c8d75482d3e846f
parent8f0e4fe56bb36831971627edee3e67de6b8eafe1
pstore/ram: Avoid allocation and leak of platform data

Yue Hu noticed that when parsing device tree the allocated platform data
was never freed. Since it's not used beyond the function scope, this
switches to using a stack variable instead.

Reported-by: Yue Hu <huyue2@yulong.com>
Fixes: 24a1e427dbd6 ("pstore/ram: add Device Tree bindings")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c