gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 106/116: ssh: remove check for a NULL pointer (!)


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 106/116: ssh: remove check for a NULL pointer (!)
Date: Tue, 05 Dec 2017 14:52:16 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit c79b2ca03d94d996c23cee13859735cc278838c1
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sat Nov 25 00:33:59 2017 +0100

    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
---
 lib/ssh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ssh.c b/lib/ssh.c
index c4a369997..2496e7cff 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2347,8 +2347,8 @@ static CURLcode ssh_statemach_act(struct connectdata 
*conn, bool *block)
         }
         sshc->sftp_handle = NULL;
       }
-      if(sftp_scp)
-        Curl_safefree(sftp_scp->path);
+
+      Curl_safefree(sftp_scp->path);
 
       DEBUGF(infof(data, "SFTP DONE done\n"));
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]