summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/lar.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc/lar.c')
-rw-r--r--payloads/libpayload/libc/lar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/lar.c b/payloads/libpayload/libc/lar.c
index 225b19001a..9ee09e2ec6 100644
--- a/payloads/libpayload/libc/lar.c
+++ b/payloads/libpayload/libc/lar.c
@@ -113,6 +113,10 @@ struct LAR *openlar(void *addr)
* tear on the heap */
lar->headers = malloc(16 * sizeof(void *));
+
+ if (!lar->headers)
+ return NULL;
+
lar->alloc = 16;
lar->count = lar->eof = 0;
lar->cindex = 0;