aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-11-30 00:31:09 +0000
committerKim F. Storm2004-11-30 00:31:09 +0000
commit68db37aa53b01c2c7b62ea3b86c4e4ce467a6c9e (patch)
treeda26621b548acc7152235f3f060a40c3093c2378 /src
parent212f33f185f9d93562aec9ab01625557c8003ee0 (diff)
downloademacs-68db37aa53b01c2c7b62ea3b86c4e4ce467a6c9e.tar.gz
emacs-68db37aa53b01c2c7b62ea3b86c4e4ce467a6c9e.zip
(malloc_initialize_hook): Don't free malloc_state_ptr if
XMALLOC_OVERRUN_CHECK to avoid crash during load.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/emacs.c b/src/emacs.c
index a6d3356847e..907d7295fc7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -584,7 +584,7 @@ init_cmdargs (argc, argv, skip_args)
584 They are decoded in the function command-line after we know 584 They are decoded in the function command-line after we know
585 locale-coding-system. */ 585 locale-coding-system. */
586 Vcommand_line_args 586 Vcommand_line_args
587 = Fcons (make_unibyte_string (argv[i], strlen (argv[i])), 587 = Fcons (make_unibyte_string (argv[i], strlen (argv[i])),
588 Vcommand_line_args); 588 Vcommand_line_args);
589 } 589 }
590 590
@@ -748,7 +748,9 @@ malloc_initialize_hook ()
748 } 748 }
749 749
750 malloc_set_state (malloc_state_ptr); 750 malloc_set_state (malloc_state_ptr);
751#ifndef XMALLOC_OVERRUN_CHECK
751 free (malloc_state_ptr); 752 free (malloc_state_ptr);
753#endif
752 } 754 }
753 else 755 else
754 { 756 {
@@ -1984,9 +1986,9 @@ sort_args (argc, argv)
1984 1986
1985 bcopy (new, argv, sizeof (char *) * argc); 1987 bcopy (new, argv, sizeof (char *) * argc);
1986 1988
1987 free (options); 1989 xfree (options);
1988 free (new); 1990 xfree (new);
1989 free (priority); 1991 xfree (priority);
1990} 1992}
1991 1993
1992DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", 1994DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",