mirror of https://github.com/dynup/kpatch
livepatch-patch-hook: fix memleak in the function patch_exit
reason: after the function klp_unregister_patch, the lpatch must be freed, otherwise, it would cause memory leak. Signed-off-by: chenzefeng <chenzefeng2@huawei.com>
This commit is contained in:
parent
d79eb87926
commit
8a319e0133
|
@ -460,6 +460,7 @@ out:
|
|||
static void __exit patch_exit(void)
|
||||
{
|
||||
WARN_ON(klp_unregister_patch(lpatch));
|
||||
patch_free_livepatch(lpatch);
|
||||
}
|
||||
|
||||
module_init(patch_init);
|
||||
|
|
Loading…
Reference in New Issue