]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream: initialize the current_rule field to NULL on stream init
authorRemi Gacogne <rgacogne-github@coredump.fr>
Wed, 22 Jul 2015 15:10:58 +0000 (17:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 26 Jul 2015 19:50:50 +0000 (21:50 +0200)
commit7fb9de25e2f18ddeba23fa23214d262a8e2aa855
treeada6b515bb77e01db7798b2de07e15c7aa52566c
parent17c3f6284cf605e47f6525c077bc644c45272849
MINOR: stream: initialize the current_rule field to NULL on stream init

Currently it is possible for the current_rule field to be evaluated before
being set, leading to valgrind complaining:

==16783== Conditional jump or move depends on uninitialised value(s)
==16783==    at 0x44E662: http_res_get_intercept_rule (proto_http.c:3730)
==16783==    by 0x44E662: http_process_res_common (proto_http.c:6528)
==16783==    by 0x4797B7: process_stream (stream.c:1851)
==16783==    by 0x414634: process_runnable_tasks (task.c:238)
==16783==    by 0x40B02F: run_poll_loop (haproxy.c:1528)
==16783==    by 0x407F25: main (haproxy.c:1887)

This was introduced by commit 152b81e7b2565862956af883820d4f79177d0651.
src/stream.c