OcBootManagementLib: Fix potential NULL free after failed DP expansion
@@ -537,9 +537,11 @@ InternalGetDefaultBootEntry (
);
} while (BootEntry == NULL);
+ if (FullDevicePath != NULL) {
FreePool (UefiDevicePath);
UefiDevicePath = FullDevicePath;
}
+ }
if (BootEntry != NULL) {
if (IsBootNext) {
