Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix fd/memory leak on error return from openconnect_open_https()
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 7faa25d commit 306a0fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gnutls.c
Expand Up @@ -1843,6 +1843,9 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
vpn_progress(vpninfo, PRG_ERR,
_("Failed to set TLS priority string: %s\n"),
gnutls_strerror(err));
gnutls_deinit(vpninfo->https_sess);
vpninfo->https_sess = NULL;
close(ssl_sock);
return -EIO;
}

Expand Down

0 comments on commit 306a0fc

Please sign in to comment.