Skip to content
Commit 0a1ebe35 authored by Yi Yang's avatar Yi Yang Committed by Masami Hiramatsu (Google)
Browse files

rethook: fix a potential memleak in rethook_alloc()

In rethook_alloc(), the variable rh is not freed or passed out
if handler is NULL, which could lead to a memleak, fix it.

Link: https://lore.kernel.org/all/20221110104438.88099-1-yiyang13@huawei.com/
[Masami: Add "rethook:" tag to the title.]

Fixes: 54ecbe6f

 ("rethook: Add a generic return hook")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
Acke-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent d1776c02
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment