summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2023-01-03 17:15:26 -0500
committerJay Satiro <raysatiro@yahoo.com>2023-01-03 17:15:26 -0500
commitfcd1b547d4a1916930d0ecff94c07e3df5bec1e0 (patch)
treeea66649d85c7409c2a3a75b39033c55116309591
parent6a8d7ef9818d5f5c9bbd9bcf4ce09feaa04a1556 (diff)
downloadcurl-fcd1b547d4a1916930d0ecff94c07e3df5bec1e0.tar.gz
http2: fix compiler warning due to uninitialized variable
Prior to this change http2_cfilter_add could return an uninitialized cfilter pointer in an OOM condition. In this case though, the pointer is discarded and not dereferenced so there was no risk of a crash.
-rw-r--r--lib/http2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 943853a77..f9e908624 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -2247,7 +2247,7 @@ static CURLcode http2_cfilter_add(struct Curl_cfilter **pcf,
struct connectdata *conn,
int sockindex)
{
- struct Curl_cfilter *cf;
+ struct Curl_cfilter *cf = NULL;
struct h2_cf_ctx *ctx;
CURLcode result = CURLE_OUT_OF_MEMORY;