]> git.ipfire.org Git - thirdparty/suricata.git/commit
threads: don't crash in slow shutdown 3157/head
authorVictor Julien <victor@inliniac.net>
Mon, 15 Jan 2018 17:16:47 +0000 (18:16 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 15 Jan 2018 17:16:57 +0000 (18:16 +0100)
commit38e6901c34119f49903fa92130afe292aa948f13
tree6f12b34efa41941b211087af3794b2c6fb898900
parent62ac13523ac818fc70f862b11fadfe6813608cb1
threads: don't crash in slow shutdown

If TmThreadDrainPacketThreads would take more than 60 seconds, the wait
loop that follows it would reach 'timeout' condition immediately. This
would lead to a null ptr deref of 'tv'.

Fix by not counting the TmThreadDrainPacketThreads and also not doing
the null ptr deref in any case.
src/tm-threads.c