(do_include): Re-fix minor memory leak by using alloca instead of
xmalloc and free. From-SVN: r9544
This commit is contained in:
parent
040c67b31d
commit
9727936469
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user