]> git.eshelyaron.com Git - emacs.git/commitdiff
(malloc_initialize_hook): Handle case thet `environ'
authorGerd Moellmann <gerd@gnu.org>
Mon, 19 Feb 2001 12:23:46 +0000 (12:23 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 19 Feb 2001 12:23:46 +0000 (12:23 +0000)
is null.

src/ChangeLog
src/emacs.c

index 44015eb92969ad22e052a69ee338cb0161d239ad..69ab0fe6bdf844bdee7fce474ddb0f3e7ce48626 100644 (file)
@@ -1,5 +1,8 @@
 2001-02-19  Gerd Moellmann  <gerd@gnu.org>
 
+       * emacs.c (malloc_initialize_hook): Handle case thet `environ'
+       is null.
+
        * ralloc.c (__morecore) [!SYSTEM_MALLOC]: Move declaration
        to the start of the file.
 
index e2b1bffe81981cce50841f3a3db7b3b39de75eff..023c036e5664f605b7a9f3734bdc39fab4c81e4b 100644 (file)
@@ -675,7 +675,7 @@ malloc_initialize_hook ()
        {
          char **p;
 
-         for (p = environ; *p; p++)
+         for (p = environ; p && *p; p++)
            if (strncmp (*p, "MALLOC_CHECK_=", 14) == 0)
              {
                do