Skip to content

Commit

Permalink
Fix static scan issues
Browse files Browse the repository at this point in the history
Tracked-On: OAM-110031
Signed-off-by: Zheng, XianjunX <[email protected]>
  • Loading branch information
xianju6x committed Mar 21, 2024
1 parent 7382952 commit 2d0f4c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions gnu-efi-3.0/lib/hand.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ LibInstallProtocolInterfaces (

Index += 1;
}

va_end(args);
//
// If there was an error, remove all the interfaces that were
// installed without any errors
Expand All @@ -504,7 +504,7 @@ LibInstallProtocolInterfaces (

Index -= 1;
}

va_end(args);
*Handle = OldHandle;
}

Expand Down Expand Up @@ -552,6 +552,7 @@ LibUninstallProtocolInterfaces (
DEBUG((D_ERROR, "LibUninstallProtocolInterfaces: failed %g, %r\n", Protocol, Handle));
}
}
va_end(args);
}


Expand Down Expand Up @@ -607,7 +608,7 @@ LibReinstallProtocolInterfaces (

Index += 1;
}

va_end(args);
//
// If there was an error, undo all the interfaces that were
// reinstalled without any errors
Expand All @@ -624,7 +625,8 @@ LibReinstallProtocolInterfaces (
uefi_call_wrapper(BS->ReinstallProtocolInterface, 4, Handle, Protocol, NewInterface, OldInterface);

Index -= 1;
}
}
va_end(args);
}

//
Expand Down
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 2d0f4c5

Please sign in to comment.