(main): Allocate COLLECT_NAME string with xmalloc.

From-SVN: r4902
This commit is contained in:
Richard Stallman 1993-07-10 21:38:19 +00:00
parent 328d079707
commit 0d8c1ccd98
1 changed files with 1 additions and 2 deletions

View File

@ -736,8 +736,7 @@ main (argc, argv)
last_file_name = getenv ("COLLECT_NAME");
p = (char *) xcalloc (sizeof (char *),
strlen (our_file_name) + strlen ("COLLECT_NAME=") + 1);
p = (char *) xmalloc (strlen (our_file_name) + strlen ("COLLECT_NAME=") + 1);
sprintf (p, "COLLECT_NAME=%s", our_file_name);
putenv (p);