summaryrefslogtreecommitdiff
path: root/src/unexmacosx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unexmacosx.c')
-rw-r--r--src/unexmacosx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 46622601281..57f70f8557f 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1318,6 +1318,8 @@ unexec_realloc (void *old_ptr, size_t new_size)
void
unexec_free (void *ptr)
{
+ if (ptr == NULL)
+ return;
if (in_dumped_exec)
{
if (!ptr_in_unexec_regions (ptr))