]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: fix alstate handling 940/head
authorVictor Julien <victor@inliniac.net>
Tue, 15 Apr 2014 10:39:22 +0000 (12:39 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 16 Apr 2014 07:47:09 +0000 (09:47 +0200)
commitfc559ce227d4254840b5f1241d5408c52879ce8c
tree38f116f041473d96eb2e3b5d25b2f72e09b356e9
parentb6e2a6f5255cd98d98f9e5dceb934d1ad5b3e434
detect: fix alstate handling

Previously, the alstate use in the main detect loop was unsafe. The
alstate pointer would be set duing a lock, but it would again be used
after one or more lock/unlock cycles. If the data pointed to would
disappear, a dangling pointer would be the result.

Due to they way flows are cleaned up using reference counting and
such, changes of this happening were very small. However, at least
one path can lead to this situation. So it had to be fixed.
src/detect-engine-state.c
src/detect.c