efivars: memory leak on error in create_efivars_bin_attributes()
PATCH 1/2 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 <[email protected]>
drivers/firmware/efivars.c +2 -2
@@ -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;
Quoted 4 lines · Dan Carpenter
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 <[email protected]>
Acked-by Mike Waychison <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html