diff options
| author | Heinrich Schuchardt <[email protected]> | 2020-04-20 12:44:56 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2020-04-30 10:25:07 +0200 |
| commit | 4fe050e65f61cc5e7734aee0637a18ac16b10061 (patch) | |
| tree | 59d90f0990e1c3fa5f02b6f07ea1192115620c54 /cmd | |
| parent | b32ac16f9a321852806fcd473136204af6b49787 (diff) | |
efi_loader: remove superfluous NULL check in bootefi.c
efi_free_pool() and efi_delete_handle() both check if their argument is
NULL. The caller should not duplicate this check.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/bootefi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index aaed5755059..54b4b8f9845 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -481,10 +481,8 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size) ret = do_bootefi_exec(handle); out: - if (mem_handle) - efi_delete_handle(mem_handle); - if (file_path) - efi_free_pool(file_path); + efi_delete_handle(mem_handle); + efi_free_pool(file_path); return ret; } |
