summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-01-02 12:48:56 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-02 13:18:58 +0100
commit42c3b23a7c66e19123e845f025c37c366fdb109b (patch)
tree26d92eadf0167257ae5d85eb29d951766275edde
parented18244df130f54290cd5729281f91fbeaf099cb (diff)
downloadcurl-42c3b23a7c66e19123e845f025c37c366fdb109b.tar.gz
cfilters: check for NULL before using pointer
Detected by Coverity CID 1518343 Closes #10202
-rw-r--r--lib/cfilters.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cfilters.c b/lib/cfilters.c
index 6408e0bc5..3e68b99d7 100644
--- a/lib/cfilters.c
+++ b/lib/cfilters.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2023, Daniel Stenberg, <daniel@haxx.se>, 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,