pop3: add null pointer check

Pointed out by Coverity. A precaution to catch internal errors.

Follow-up to 76d13c721b

Closes #17255
This commit is contained in:
Daniel Stenberg 2025-05-06 11:05:30 +02:00
parent a30830db78
commit f7c544d867
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -311,6 +311,9 @@ static bool pop3_endofresp(struct Curl_easy *data, struct connectdata *conn,
{
struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN);
(void)data;
DEBUGASSERT(pop3c);
if(!pop3c) /* internal error */
return TRUE;
/* Do we have an error response? */
if(len >= 4 && !memcmp("-ERR", line, 4)) {