fix threading issue in debug log. locked mutex isn't freed before returning. fixed

remotes/origin/master-1.1.x
Anoop Saldanha 15 years ago committed by Victor Julien
parent d23e775ae2
commit 67be07bf15

@ -286,6 +286,7 @@ TmEcode AlertDebugLogIPv4(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq
uint8_t flag; uint8_t flag;
if ((! PKT_IS_TCP(p)) || p->flow == NULL || if ((! PKT_IS_TCP(p)) || p->flow == NULL ||
p->flow->protoctx == NULL) { p->flow->protoctx == NULL) {
SCMutexUnlock(&aft->file_ctx->fp_mutex);
return TM_ECODE_OK; return TM_ECODE_OK;
} }
/* IDS mode reverse the data */ /* IDS mode reverse the data */
@ -299,6 +300,7 @@ TmEcode AlertDebugLogIPv4(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq
AlertDebugPrintStreamSegmentCallback, AlertDebugPrintStreamSegmentCallback,
(void *)aft); (void *)aft);
if (ret != 1) { if (ret != 1) {
SCMutexUnlock(&aft->file_ctx->fp_mutex);
return TM_ECODE_FAILED; return TM_ECODE_FAILED;
} }
} }

Loading…
Cancel
Save