]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: httpclient: fix uninitialized sl variable
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 20 Aug 2021 09:24:13 +0000 (11:24 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 20 Aug 2021 09:53:16 +0000 (11:53 +0200)
Reported by coverity in ticket #1355

  CID 1461505:  Memory - illegal accesses  (UNINIT)
  Using uninitialized value "sl".

Fix the problem by initializing sl to NULL.

src/http_client.c

index 6142c4857ec83e7840cbfeb846eee254ef0aac85..7e950f96cb08426f0312e79fc3891e3a13de2b9e 100644 (file)
@@ -437,7 +437,7 @@ static void httpclient_applet_io_handler(struct appctx *appctx)
        struct channel *res = &s->res;
        struct htx_blk *blk = NULL;
        struct htx *htx;
-       struct htx_sl *sl;
+       struct htx_sl *sl = NULL;
        int32_t pos;
        uint32_t hdr_num;