mirror of
https://github.com/curl/curl.git
synced 2026-05-17 09:56:21 +03:00
Pointer "cur_pos" dereferenced before NULL check, found by coverity.com scan.
Removed the NULL check since the pointer must be valid already.
This commit is contained in:
parent
6fc151577e
commit
74e54c5a49
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue