mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 23:37:01 +00:00
efi_selftest: avoid dereferencing NULL in tpl test
The task priority levels test uses two events one passes the notification counter as context. The other passes NULL. Both use the same notification function. So we need to check for NULL here. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
c155dfeb1e
commit
7f8ec5b63e
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ static void EFIAPI notify(struct efi_event *event, void *context)
|
|||
{
|
||||
unsigned int *count = context;
|
||||
|
||||
++*count;
|
||||
if (count)
|
||||
++*count;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue