# HG changeset patch # User Jim Meyering # Date 1213311187 0 # Node ID 9ae1040f70e5c1375e18dad6d39641a7d5c89ffc # Parent d719efd8c628c96657a1cf61485371e844fe96c6 make unexec_free handle NULL the same way free does * unexmacosx.c (unexec_free): Ignore a NULL argument. diff -r d719efd8c628 -r 9ae1040f70e5 src/ChangeLog --- a/src/ChangeLog Thu Jun 12 20:53:18 2008 +0000 +++ b/src/ChangeLog Thu Jun 12 22:53:07 2008 +0000 @@ -1,3 +1,8 @@ +2008-06-12 Jim Meyering + + make unexec_free handle NULL the same way free does + * unexmacosx.c (unexec_free): Ignore a NULL argument. + 2008-06-12 Stefan Monnier * character.h (CHAR_TO_BYTE_SAFE): New macro. diff -r d719efd8c628 -r 9ae1040f70e5 src/unexmacosx.c --- a/src/unexmacosx.c Thu Jun 12 20:53:18 2008 +0000 +++ b/src/unexmacosx.c Thu Jun 12 22:53:07 2008 +0000 @@ -1318,6 +1318,8 @@ void unexec_free (void *ptr) { + if (ptr == NULL) + return; if (in_dumped_exec) { if (!ptr_in_unexec_regions (ptr))