Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspect mLoggerInfo before accessing in the event callback #345

Merged
merged 6 commits into from
Nov 15, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ OnRealTimeClockArchNotification (

SystemTable->BootServices->CloseEvent (Event);

Status = SystemTable->RuntimeServices->GetTime ((EFI_TIME *)&mLoggerInfo->Time, NULL);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: error getting real time. Code=%r\n", __FUNCTION__, Status));
} else {
mLoggerInfo->TicksAtTime = GetPerformanceCounter ();
if (mLoggerInfo != NULL) {
Status = SystemTable->RuntimeServices->GetTime ((EFI_TIME *)&mLoggerInfo->Time, NULL);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: error getting real time. Code=%r\n", __FUNCTION__, Status));
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
} else {
mLoggerInfo->TicksAtTime = GetPerformanceCounter ();
}
}

return;
Expand Down