Skip to content

Commit

Permalink
Fix static scan issues
Browse files Browse the repository at this point in the history
There may be a null pointer dereference, or else the comparison against
null is unnecessary.

Tracked-On: OAM-106954
Signed-off-by: Zheng, XianjunX <[email protected]>
  • Loading branch information
xianju6x authored and sysopenci committed Mar 22, 2023
1 parent c4539c5 commit 5996cd7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gnu-efi-3.0/lib/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,7 @@ LibInsertToTailOfBootOrder (
VarSize, (VOID*) NewBootOptionArray
);

if (NewBootOptionArray) {
FreePool (NewBootOptionArray);
}
FreePool (NewBootOptionArray);
if (BootOptionArray) {
FreePool (BootOptionArray);
}
Expand Down

0 comments on commit 5996cd7

Please sign in to comment.