Commit de279099 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

bail out nicely if strdup() returns NULL, removed trailing whitespace

parent 6bd8db3c
Loading
Loading
Loading
Loading
+33 −29
Original line number Diff line number Diff line
@@ -334,6 +334,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
        easy->result = Curl_done(easy->easy_conn, CURLE_OK);
        if(CURLE_OK == easy->result) {
          gotourl = strdup(easy->easy_handle->change.url);
          if(gotourl) {
            easy->easy_handle->change.url_changed = FALSE;
            easy->result = Curl_follow(easy->easy_handle, gotourl);
            if(CURLE_OK == easy->result)
@@ -341,6 +342,9 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
            else
              free(gotourl);
          }
          else
            easy->result = CURLE_OUT_OF_MEMORY;
        }
      }

      easy->easy_handle->change.url_changed = FALSE;