svn commit: r328290 - head/stand/common
Warner Losh
imp at FreeBSD.org
Tue Jan 23 18:01:33 UTC 2018
Author: imp
Date: Tue Jan 23 18:01:32 2018
New Revision: 328290
URL: https://svnweb.freebsd.org/changeset/base/328290
Log:
On malloc failure, be sure to close the include file that triggered
it.
CID: 1007775
Sponsored by: Netflix
Modified:
head/stand/common/interp.c
Modified: head/stand/common/interp.c
==============================================================================
--- head/stand/common/interp.c Tue Jan 23 18:01:27 2018 (r328289)
+++ head/stand/common/interp.c Tue Jan 23 18:01:32 2018 (r328290)
@@ -250,6 +250,7 @@ include(const char *filename)
snprintf(command_errbuf, sizeof(command_errbuf),
"file '%s' line %d: memory allocation failure - aborting",
filename, line);
+ close(fd);
return (CMD_ERROR);
}
strcpy(sp->text, cp);
More information about the svn-src-all
mailing list