Commit 199b3e46 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

get_url_file_name: never return a NULL string *and* OK

Change 987a4a73 assumes that as it simplifies life in the calling
function.

Reported-by: Fabian Keil
parent 558814e1
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -143,12 +143,10 @@ CURLcode get_url_file_name(char **filename, const char *url)
  if(pc) {
    /* duplicate the string beyond the slash */
    pc++;
    if(*pc) {
    *filename = strdup(pc);
    if(!*filename)
      return CURLE_OUT_OF_MEMORY;
  }
  }

  /* in case we built debug enabled, we allow an environment variable
   * named CURL_TESTDIR to prefix the given file name to put it into a