]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix 2 memory leaks in proxy authentication routine
authorGuido Vranken <guidovranken@gmail.com>
Thu, 8 Jun 2017 14:36:54 +0000 (16:36 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 9 Jun 2017 20:35:48 +0000 (22:35 +0200)
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAO5O-EL11jDxO+c1Gu0FvunqwUTW2uxjy910+A-s63Nr5O3NWw@mail.gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14758.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 8d606cd3f6bce304874b1d7745d40d11f64ea17d)

src/openvpn/proxy.c

index 0d0bd3c4c29898cb733d11f856e420054d4f7e74..1b3af0e67122c4bc8c86bd24037930281cdf817c 100644 (file)
@@ -289,6 +289,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;
        }
@@ -830,6 +831,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;