summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-12-22 21:44:31 +0100
committerKay Sievers <kay@vrfy.org>2014-12-25 22:07:12 +0100
commitf4ba9b33fd742f7767bfc294e8f186a4813c7982 (patch)
treea2e16334ba06d3833873a4ff57bee1a40c0847d7
parenteb3daf2ca4cb1657cf1f780957485d690a552bf6 (diff)
gummiboot: freeing the wrong variable
The error path in efivar_get free's what would have been the copy of the string if the strcpy had succeeded, which it did not (or we wouldn't be in the error path). Signed-off-by: David Härdeman <david@hardeman.nu>
-rw-r--r--src/efi/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/efi/util.c b/src/efi/util.c
index 4715c57..7cb8e0f 100644
--- a/src/efi/util.c
+++ b/src/efi/util.c
@@ -102,7 +102,7 @@ EFI_STATUS efivar_get(CHAR16 *name, CHAR16 **value) {
val = StrDuplicate((CHAR16 *)buf);
if (!val) {
- FreePool(val);
+ FreePool(buf);
return EFI_OUT_OF_RESOURCES;
}