diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-05-06 01:37:25 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-05-07 18:23:16 +0200 |
commit | 3fdff6be40b01423aacf2c02eb3b4ef6d2186caf (patch) | |
tree | a194d3e7c9c2be4dfdff73bed8a41a7b04cac81e /lib/efi_loader/efi_variable.c | |
parent | 549b79e8e04930f515ace28556d1cea779a1086a (diff) |
efi_loader: error handling in efi_set_variable_common().
Fix unreachable code. Free memory on error.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_variable.c')
-rw-r--r-- | lib/efi_loader/efi_variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 58f8fae358..33df52e663 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -981,7 +981,7 @@ static efi_status_t efi_set_variable_common(u16 *variable_name, if (append) { old_data = malloc(old_size); if (!old_data) { - return EFI_OUT_OF_RESOURCES; + ret = EFI_OUT_OF_RESOURCES; goto err; } ret = EFI_CALL(efi_get_variable(variable_name, vendor, |