From: Jim Meyering Date: Thu, 12 Jun 2008 22:53:07 +0000 (+0000) Subject: make unexec_free handle NULL the same way free does X-Git-Tag: emacs-pretest-23.0.90~4845 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c5e177ecf929a3c4aaf76133dbe3eacac124b2b;p=emacs.git make unexec_free handle NULL the same way free does * unexmacosx.c (unexec_free): Ignore a NULL argument. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6361f522fe7..a936794edc7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --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))