From 96726af95a3882a4745e3e5b16372e76091c6ab1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 15 May 2025 21:58:36 +0200 Subject: [PATCH] libssh: add NULL check for Curl_meta_get() It really cannot return NULL in a working condition, but ... Pointed out by Coverity. Closes #17359 --- lib/vssh/libssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 30fde410dd..14568e67dd 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -2458,7 +2458,7 @@ static CURLcode myssh_done(struct Curl_easy *data, CURLcode result = CURLE_OK; struct SSHPROTO *sshp = Curl_meta_get(data, CURL_META_SSH_EASY); - if(!status) { + if(!status && sshp) { /* run the state-machine */ result = myssh_block_statemach(data, sshc, sshp, FALSE); }