Commit 74e54c5a authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Pointer "cur_pos" dereferenced before NULL check, found by coverity.com scan.

Removed the NULL check since the pointer must be valid already.
parent 6fc15157
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3674,7 +3674,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
  case FTPFILE_SINGLECWD:
    /* get the last slash */
    slash_pos=strrchr(cur_pos, '/');
    if(slash_pos || !cur_pos || !*cur_pos) {
    if(slash_pos || !*cur_pos) {
      ftpc->dirdepth = 1; /* we consider it to be a single dir */
      ftpc->dirs = (char **)calloc(1, sizeof(ftpc->dirs[0]));
      if(!ftpc->dirs)