aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-03-30 20:52:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-03-30 20:52:42 +0000
commit74e54c5a49aab4e71439b905f40c7b35d13258a2 (patch)
tree6e09b19b4ebbee7408525899edebfe1d2aceaf8d /lib/ftp.c
parent6fc151577e39ccfefc63342e6cbaf752238c0478 (diff)
Pointer "cur_pos" dereferenced before NULL check, found by coverity.com scan.
Removed the NULL check since the pointer must be valid already.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 4fe25dc97..eb92a67f4 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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)