Commit 6561ec52 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

don't attempt to ftp_cwd() on a NULL path

parent 982c5460
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1928,7 +1928,7 @@ CURLcode ftp_perform(struct connectdata *conn,
  /* This is a re-used connection. Since we change directory to where the
  /* This is a re-used connection. Since we change directory to where the
     transfer is taking place, we must now get back to the original dir
     transfer is taking place, we must now get back to the original dir
     where we ended up after login: */
     where we ended up after login: */
  if (conn->bits.reuse) {
  if (conn->bits.reuse && ftp->entrypath) {
    if ((result = ftp_cwd(conn, ftp->entrypath)) != CURLE_OK)
    if ((result = ftp_cwd(conn, ftp->entrypath)) != CURLE_OK)
      return result;
      return result;
  }
  }