Commit 97279364 by Richard Kenner

(do_include): Re-fix minor memory leak by using alloca instead of

xmalloc and free.

From-SVN: r9544
parent 040c67b3
......@@ -4573,13 +4573,12 @@ get_filename:
if (searchptr->fname[0] == 0)
continue;
p = xmalloc (strlen (searchptr->fname)
+ strlen (fname) + 2);
p = alloca (strlen (searchptr->fname)
+ strlen (fname) + 2);
strcpy (p, searchptr->fname);
strcat (p, "/");
strcat (p, fname);
deps_output (p, ' ');
free (p);
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment