Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Close config_fd before returning from write_new_config()
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 838223b commit 87d3f31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.c
Expand Up @@ -885,10 +885,11 @@ static int write_new_config(void *_vpninfo, char *buf, int buflen)
err = errno;
fprintf(stderr, _("Failed to write config to %s: %s\n"),
vpninfo->xmlconfig, strerror(err));

close(config_fd);
return -err;
}

close(config_fd);
return 0;
}

Expand Down

0 comments on commit 87d3f31

Please sign in to comment.