libssh: add NULL check for Curl_meta_get()

It really cannot return NULL in a working condition, but ...

Pointed out by Coverity.

Closes #17359
This commit is contained in:
Daniel Stenberg 2025-05-15 21:58:36 +02:00
parent f7ff1d1e5e
commit 96726af95a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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);
}