Commit 910ee13b authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Fixed an out of memory handling issue.

parent 35935d71
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1206,15 +1206,18 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
            /* CRLF terminate the request */
            result = add_bufferf(req_buffer, "\r\n");

          if(CURLE_OK == result)
          if(CURLE_OK == result) {
            /* Now send off the request */
            result = add_buffer_send(req_buffer, conn,
                                     &data->info.request_size, 0, sockindex);
            req_buffer = NULL;
          }
        }
        if(result)
          failf(data, "Failed sending CONNECT to proxy");
      }
      free(host_port);
      Curl_safefree(req_buffer);
      if(result)
        return result;