From: Richard Stallman Date: Sat, 10 Jul 1993 21:38:19 +0000 (+0000) Subject: (main): Allocate COLLECT_NAME string with xmalloc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d8c1ccd98a08f6e2dedaf2d86dd615b004d7543;p=gcc.git (main): Allocate COLLECT_NAME string with xmalloc. From-SVN: r4902 --- diff --git a/gcc/collect2.c b/gcc/collect2.c index 0a9f1e5c08f..464eb44cf9b 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -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);