Commit 3454319c authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

prevent memory leak when going out of memory

parent 02c78ecf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
    malloc(sizeof(struct connectdata *) * data->state.numconnects);

  if(!data->state.connects) {
    free(data->state.headerbuff);
    free(data);
    return CURLE_OUT_OF_MEMORY;
  }