diff options
author | Dan Carpenter <error27@gmail.com> | 2011-03-18 03:12:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-19 19:45:50 -0400 |
commit | 051d51bc6a867d9466a975e4d7ca51b21a9c2c4e (patch) | |
tree | 3ff593b4ef7c9372f79d4251cef45f3a5dfde0a5 /drivers/firmware | |
parent | bcdd323b893ad3c9b7ef26b5e4a0bef974238501 (diff) |
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>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efivars.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index ff0c373e3bbf..ff2fe4095228 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -677,8 +677,8 @@ create_efivars_bin_attributes(struct efivars *efivars) | |||
677 | 677 | ||
678 | return 0; | 678 | return 0; |
679 | out_free: | 679 | out_free: |
680 | kfree(efivars->new_var); | 680 | kfree(efivars->del_var); |
681 | efivars->new_var = NULL; | 681 | efivars->del_var = NULL; |
682 | kfree(efivars->new_var); | 682 | kfree(efivars->new_var); |
683 | efivars->new_var = NULL; | 683 | efivars->new_var = NULL; |
684 | return error; | 684 | return error; |