summaryrefslogtreecommitdiff
path: root/src/unexmacosx.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2008-06-12 22:53:07 +0000
committerJim Meyering <jim@meyering.net>2008-06-12 22:53:07 +0000
commitf324ecf462ccd8f6fddc003ab1a3be7c17adebbd (patch)
tree1430502cce3cc9a3f95a72c3590638bbc30f83dd /src/unexmacosx.c
parent25a27b72172249e0ae6b6c7b9459cb47694a4f34 (diff)
downloademacs-f324ecf462ccd8f6fddc003ab1a3be7c17adebbd.tar.gz
make unexec_free handle NULL the same way free does
* unexmacosx.c (unexec_free): Ignore a NULL argument.
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))