detect state: always lock de_state_m

Always lock the de_state_m on access, also at flow recycle or
cleanup.
pull/1153/head
Victor Julien 11 years ago
parent 0d15d4f6c3
commit 0fff3c833e

@ -98,7 +98,9 @@
(f)->data_al_so_far[1] = 0; \
(f)->de_ctx_id = 0; \
if ((f)->de_state != NULL) { \
SCMutexLock(&(f)->de_state_m); \
DetectEngineStateReset((f)->de_state, (STREAM_TOSERVER | STREAM_TOCLIENT)); \
SCMutexUnlock(&(f)->de_state_m); \
} \
(f)->sgh_toserver = NULL; \
(f)->sgh_toclient = NULL; \
@ -116,7 +118,9 @@
\
FLOWLOCK_DESTROY((f)); \
if ((f)->de_state != NULL) { \
SCMutexLock(&(f)->de_state_m); \
DetectEngineStateFree((f)->de_state); \
SCMutexUnlock(&(f)->de_state_m); \
} \
GenericVarFree((f)->flowvar); \
SCMutexDestroy(&(f)->de_state_m); \

Loading…
Cancel
Save