From: Daniel Stenberg Date: Mon, 2 Jan 2023 11:48:56 +0000 (+0100) Subject: cfilters: check for NULL before using pointer X-Git-Tag: curl-7_88_0~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42c3b23a7c66e19123e845f025c37c366fdb109b;p=thirdparty%2Fcurl.git cfilters: check for NULL before using pointer Detected by Coverity CID 1518343 Closes #10202 --- diff --git a/lib/cfilters.c b/lib/cfilters.c index 6408e0bc5e..3e68b99d74 100644 --- a/lib/cfilters.c +++ b/lib/cfilters.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2023, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -605,7 +605,7 @@ void Curl_conn_ev_update_info(struct Curl_easy *data, bool Curl_conn_is_alive(struct Curl_easy *data, struct connectdata *conn) { struct Curl_cfilter *cf = conn->cfilter[FIRSTSOCKET]; - return !cf->conn->bits.close && cf && cf->cft->is_alive(cf, data); + return cf && !cf->conn->bits.close && cf->cft->is_alive(cf, data); } CURLcode Curl_conn_keep_alive(struct Curl_easy *data,