1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

ssh: remove check for a NULL pointer (!)

With this check present, scan-build warns that we might dereference this
point in other places where it isn't first checked for NULL. Thus, if it
*can* be NULL we have a problem on a few places. However, this pointer
should not be possible to be NULL here so I remove the check and thus
also three different scan-build warnings.

Closes #2111
This commit is contained in:
Daniel Stenberg 2017-11-25 00:33:59 +01:00
parent 3da4ebad30
commit c79b2ca03d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2347,7 +2347,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
} }
sshc->sftp_handle = NULL; sshc->sftp_handle = NULL;
} }
if(sftp_scp)
Curl_safefree(sftp_scp->path); Curl_safefree(sftp_scp->path);
DEBUGF(infof(data, "SFTP DONE done\n")); DEBUGF(infof(data, "SFTP DONE done\n"));