changeset 58632:c0b9a69b829b

(malloc_initialize_hook): Don't free malloc_state_ptr if XMALLOC_OVERRUN_CHECK to avoid crash during load.
author Kim F. Storm <storm@cua.dk>
date Tue, 30 Nov 2004 00:31:09 +0000
parents 7c469d30a12d
children 55d668830eed
files src/emacs.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Tue Nov 30 00:30:56 2004 +0000
+++ b/src/emacs.c	Tue Nov 30 00:31:09 2004 +0000
@@ -584,7 +584,7 @@
 	   They are decoded in the function command-line after we know
 	   locale-coding-system.  */
 	Vcommand_line_args
-	  = Fcons (make_unibyte_string (argv[i], strlen (argv[i])), 
+	  = Fcons (make_unibyte_string (argv[i], strlen (argv[i])),
 		   Vcommand_line_args);
     }
 
@@ -748,7 +748,9 @@
 	}
 
       malloc_set_state (malloc_state_ptr);
+#ifndef XMALLOC_OVERRUN_CHECK
       free (malloc_state_ptr);
+#endif
     }
   else
     {
@@ -1984,9 +1986,9 @@
 
   bcopy (new, argv, sizeof (char *) * argc);
 
-  free (options);
-  free (new);
-  free (priority);
+  xfree (options);
+  xfree (new);
+  xfree (priority);
 }
 
 DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",