From: Kim F. Storm Date: Tue, 30 Nov 2004 00:31:09 +0000 (+0000) Subject: (malloc_initialize_hook): Don't free malloc_state_ptr if X-Git-Tag: ttn-vms-21-2-B4~3560 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68db37aa53b01c2c7b62ea3b86c4e4ce467a6c9e;p=emacs.git (malloc_initialize_hook): Don't free malloc_state_ptr if XMALLOC_OVERRUN_CHECK to avoid crash during load. --- 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) 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_initialize_hook () } malloc_set_state (malloc_state_ptr); +#ifndef XMALLOC_OVERRUN_CHECK free (malloc_state_ptr); +#endif } else { @@ -1984,9 +1986,9 @@ sort_args (argc, argv) 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",