diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-07-27 18:07:02 -0700 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2011-07-27 18:08:10 -0700 |
commit | 02e59579ef2aee1a94262f96c0a001feef495895 (patch) | |
tree | 80c15639e47709dfc2f28d6cbddbad71c1cb222f | |
parent | dddf9aa610b32a6b7aa304826dbf962c951e2203 (diff) |
Fixed a couple of memory leaks in NTLM SSO support
-rw-r--r-- | lib/http_ntlm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 5e164f2b7..efc38c7d5 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -817,6 +817,7 @@ static CURLcode sso_ntlm_initiate(struct connectdata *conn, conn->fd_helper = sockfds[0]; conn->pid = pid; Curl_safefree(domain); + Curl_safefree(ntlm_auth_alloc); return CURLE_OK; done: @@ -962,9 +963,13 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, break; case NTLMSTATE_TYPE2: input = aprintf("TT %s\n", conn->challenge_header); + if(!input) + return CURLE_OUT_OF_MEMORY; res = sso_ntlm_response(conn, input, ntlm->state); + free(input); + input = NULL; if(res) return res; @@ -976,7 +981,6 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */ authp->done = TRUE; sso_ntlm_close(conn); - free(input); break; case NTLMSTATE_TYPE3: /* connection is already authenticated, |