Commit 9c5e177e authored by Jim Meyering's avatar Jim Meyering
Browse files

make unexec_free handle NULL the same way free does

* unexmacosx.c (unexec_free): Ignore a NULL argument.
parent 455af463
2008-06-12 Jim Meyering <meyering@redhat.com>
make unexec_free handle NULL the same way free does
* unexmacosx.c (unexec_free): Ignore a NULL argument.
2008-06-12 Stefan Monnier <monnier@iro.umontreal.ca> 2008-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
* character.h (CHAR_TO_BYTE_SAFE): New macro. * character.h (CHAR_TO_BYTE_SAFE): New macro.
......
...@@ -1318,6 +1318,8 @@ unexec_realloc (void *old_ptr, size_t new_size) ...@@ -1318,6 +1318,8 @@ unexec_realloc (void *old_ptr, size_t new_size)
void void
unexec_free (void *ptr) unexec_free (void *ptr)
{ {
if (ptr == NULL)
return;
if (in_dumped_exec) if (in_dumped_exec)
{ {
if (!ptr_in_unexec_regions (ptr)) if (!ptr_in_unexec_regions (ptr))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment