Skip to content

Commit

Permalink
Close XML file handle before error return if fstat() fails
Browse files Browse the repository at this point in the history
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 bda1490
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xml.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit bda1490

Please sign in to comment.