summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Farmer <gmbr3@opensuse.org>2023-05-03 11:19:41 +0100
committerCallum Farmer <gmbr3@opensuse.org>2023-05-07 16:43:09 +0100
commit74b7b5e92c7ac329af95f66c6b2906a7ac3bf1d7 (patch)
treec078ac1acde3f926c0b4df9b7659e679280a68ec
parent9c5403e1e6269bd47a4c383cfeaf1a4f29db121f (diff)
downloadgnu-efi-74b7b5e92c7ac329af95f66c6b2906a7ac3bf1d7.tar.gz
entry.c: Fix null pointer exception
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
-rw-r--r--lib/entry.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/entry.c b/lib/entry.c
index 5032f81..1aac667 100644
--- a/lib/entry.c
+++ b/lib/entry.c
@@ -24,13 +24,13 @@ static void ctors(void)
{
for (funcp *location = (void *)&__init_array_start; location < (funcp *)&__init_array_end; location++) {
funcp func = *location;
- if (location != NULL)
+ if (*location != NULL)
func();
}
for (funcp *location = (void *)&__CTOR_END__; location > (funcp *)&__CTOR_LIST__; location--) {
funcp func = *location;
- if (location != NULL)
+ if (*location != NULL)
func();
}
}
@@ -39,13 +39,13 @@ static void dtors(void)
{
for (funcp *location = (void *)&__DTOR_LIST__; location < (funcp *)&__DTOR_END__; location++) {
funcp func = *location;
- if (location != NULL)
+ if (*location != NULL)
func();
}
for (funcp *location = (void *)&__fini_array_start; location < (funcp *)&__fini_array_end; location++) {
funcp func = *location;
- if (location != NULL)
+ if (*location != NULL)
func();
}
}