Unverified Commit c79b2ca0 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent 3da4ebad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2347,7 +2347,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        }
        sshc->sftp_handle = NULL;
      }
      if(sftp_scp)

      Curl_safefree(sftp_scp->path);

      DEBUGF(infof(data, "SFTP DONE done\n"));