Fix leak of fd handle reported by Coverity

NB: Fixes Coverity CID1039288

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 13:07:18 +01:00
parent 18a9719003
commit 93fc18daf2
1 changed files with 1 additions and 0 deletions

View File

@ -6129,6 +6129,7 @@ push_parse_file(cpp_reader * pfile, const char *fname)
if (fd < 0)
{
cpp_perror_with_name(pfile, pend->arg);
if (f) close(f);
return FATAL_EXIT_CODE;
}
cpp_push_buffer(pfile, NULL, 0);