Skip to content

Commit

Permalink
Fix request buffer leak in do_https_request()
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 Mar 14, 2015
1 parent fc8b472 commit 01bc852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http.c
Expand Up @@ -789,7 +789,7 @@ int do_https_request(struct openconnect_info *vpninfo, const char *method,
const char *request_body_type, struct oc_text_buf *request_body,
char **form_buf, int fetch_redirect)
{
struct oc_text_buf *buf;
struct oc_text_buf *buf = buf_alloc();
int result;
int rq_retry;
int rlen, pad;
Expand Down Expand Up @@ -821,7 +821,7 @@ int do_https_request(struct openconnect_info *vpninfo, const char *method,
*
* So we process the HTTP for ourselves...
*/
buf = buf_alloc();
buf_truncate(buf);
buf_append(buf, "%s /%s HTTP/1.1\r\n", method, vpninfo->urlpath ?: "");
if (auth) {
result = gen_authorization_hdr(vpninfo, 0, buf);
Expand Down

0 comments on commit 01bc852

Please sign in to comment.