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: Dan Carpenter <error27@gmail.com>
Acked-by: Mike Waychison <mikew@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Dan Carpenter 2011-03-18 10:12:14 +03:00 committed by Greg Kroah-Hartman
parent bcdd323b89
commit 051d51bc6a

View File

@ -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;