Skip to content
Permalink
Browse files
Close XML file handle before error return if fstat() fails
Spotted by Coverity.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 26, 2012
1 parent 7a386a1 commit bda149086268c43223a10dcee4815e0bd099bed0
Showing with 1 addition and 0 deletions.
  1. +1 −0 xml.c
1 xml.c
@@ -58,6 +58,7 @@ int config_lookup_host(struct openconnect_info *vpninfo, const char *host)

if (fstat(fd, &st)) {
perror(_("fstat XML config file"));
close(fd);
return -1;
}

0 comments on commit bda1490

Please sign in to comment.