diff --git a/lib/http.c b/lib/http.c
index 35baa34..768ab5f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2274,6 +2274,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   Curl_safefree (conn->allocptr.userpwd);
   conn->allocptr.userpwd = NULL;
 
+  /* basic/digest should get reused; free header for Negotiate and NTLM */
+  switch (data->state.authproxy.picked)
+  {
+  case CURLAUTH_NEGOTIATE:
+  case CURLAUTH_NTLM:
+  case CURLAUTH_NTLM_WB:
+    Curl_safefree(conn->allocptr.proxyuserpwd);
+    conn->allocptr.proxyuserpwd = NULL;
+    break;
+  }
+
   if(result)
     return result;
 
