提交 051d51bc 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

efivars: memory leak on error in create_efivars_bin_attributes()

This is a cut and paste bug.  We intended to free ->del_var and
->new_var but we only free ->new_var.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NMike Waychison <mikew@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 bcdd323b
......@@ -677,8 +677,8 @@ create_efivars_bin_attributes(struct efivars *efivars)
return 0;
out_free:
kfree(efivars->new_var);
efivars->new_var = NULL;
kfree(efivars->del_var);
efivars->del_var = NULL;
kfree(efivars->new_var);
efivars->new_var = NULL;
return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册