From: Guido Vranken Date: Thu, 8 Jun 2017 14:36:54 +0000 (+0200) Subject: Fix 2 memory leaks in proxy authentication routine X-Git-Tag: v2.5_beta1~685 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d606cd3f6bce304874b1d7745d40d11f64ea17d;p=thirdparty%2Fopenvpn.git Fix 2 memory leaks in proxy authentication routine Signed-off-by: Guido Vranken Acked-by: Gert Doering Message-Id: URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14758.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c index b0ed32796..8ff09ba90 100644 --- a/src/openvpn/proxy.c +++ b/src/openvpn/proxy.c @@ -318,6 +318,7 @@ get_proxy_authenticate(socket_descriptor_t sd, { if (!recv_line(sd, buf, sizeof(buf), timeout, true, NULL, signal_received)) { + free(*data); *data = NULL; return HTTP_AUTH_NONE; } @@ -991,6 +992,7 @@ establish_http_proxy_passthru(struct http_proxy_info *p, if (p->options.auth_retry == PAR_NCT && method == HTTP_AUTH_BASIC) { msg(D_PROXY, "HTTP proxy: support for basic auth and other cleartext proxy auth methods is disabled"); + free(pa); goto error; } p->auth_method = method;