Commit 60ed8d72 authored by Daniel Gustafsson's avatar Daniel Gustafsson
Browse files

ntlm_wb: Fix memory leaks in ntlm_wb_response



When erroring out on a request being too large, the existing buffer was
leaked. Fix by explicitly freeing on the way out.

Closes #2966
Reviewed-by: default avatarDaniel Stenberg <daniel@haxx.se>
parent 66b3c186
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,

    if(len_out > MAX_NTLM_WB_RESPONSE) {
      failf(conn->data, "too large ntlm_wb response!");
      free(buf);
      return CURLE_OUT_OF_MEMORY;
    }