// Get CSR (Apple's System Integrity Protection [SIP], or "rootless") status
// information.
EFI_STATUS GetCsrStatus(UINT32 *CsrStatus) {
- UINT32 *ReturnValue;
+ UINT32 *ReturnValue = NULL;
UINTN CsrLength;
EFI_GUID CsrGuid = CSR_GUID;
EFI_STATUS Status = EFI_INVALID_PARAMETER;
} else {
Status = EFI_BAD_BUFFER_SIZE;
}
- }
- MyFreePool(ReturnValue);
- }
+ MyFreePool(ReturnValue);
+ } // if (Status == EFI_SUCCESS)
+ } // if (CsrStatus)
return Status;
} // INTN GetCsrStatus()