summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-15 17:46:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-15 17:46:24 +0200
commit67350dde7add7f8b5092df813444227b3b72ec26 (patch)
treee1cb75efe5e9b03799998e22bb4713a96f569d9d
parent0d7c55bd57ffd5fedb5862e123673d35704b58ac (diff)
downloadcurl-bagder/libssh2-value-not-read.tar.gz
libssh2: fix Value stored to 'sshp' is never readbagder/libssh2-value-not-read
Pointed out by scan-build
-rw-r--r--lib/vssh/libssh2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index 9d188d058..2d431ce34 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -3054,17 +3054,15 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
#ifdef CURL_LIBSSH2_DEBUG
curl_socket_t sock;
#endif
- struct SSHPROTO *sshp = data->req.p.ssh;
struct ssh_conn *sshc;
CURLcode result;
struct connectdata *conn = data->conn;
/* initialize per-handle data if not already */
- if(!sshp) {
+ if(!data->req.p.ssh) {
result = ssh_setup_connection(data, conn);
if(result)
return result;
- sshp = data->req.p.ssh;
}
/* We default to persistent connections. We set this already in this connect