Skip to content

Commit

Permalink
Fix leak of form_buf on redirect/repost/etc
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Nov 24, 2010
1 parent d707fc5 commit 099f0cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http.c
Expand Up @@ -599,6 +599,10 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo)
char *method = "GET";

retry:
if (form_buf) {
free(form_buf);
form_buf = NULL;
}
if (!vpninfo->https_ssl && openconnect_open_https(vpninfo)) {
vpninfo->progress(vpninfo, PRG_ERR, "Failed to open HTTPS connection to %s\n",
vpninfo->hostname);
Expand Down

0 comments on commit 099f0cc

Please sign in to comment.