From: Daniel Stenberg Date: Thu, 15 May 2025 19:58:36 +0000 (+0200) Subject: libssh: add NULL check for Curl_meta_get() X-Git-Tag: curl-8_14_0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96726af95a3882a4745e3e5b16372e76091c6ab1;p=thirdparty%2Fcurl.git libssh: add NULL check for Curl_meta_get() It really cannot return NULL in a working condition, but ... Pointed out by Coverity. Closes #17359 --- 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); }