uint32_t ret;
- if (p->flowflags & FLOW_PKT_TOSERVER) {
+ if (p->flowflags & FLOW_PKT_TOSERVER && det_ctx->sgh->mpm_stream_ctx_ts != NULL) {
ret = mpm_table[det_ctx->sgh->mpm_stream_ctx_ts->mpm_type].
Search(det_ctx->sgh->mpm_stream_ctx_ts, &det_ctx->mtc, &det_ctx->pmq,
p->payload, p->payload_len);
- } else {
+ } else if (p->flowflags & FLOW_PKT_TOCLIENT && det_ctx->sgh->mpm_stream_ctx_tc != NULL) {
ret = mpm_table[det_ctx->sgh->mpm_stream_ctx_tc->mpm_type].
Search(det_ctx->sgh->mpm_stream_ctx_tc, &det_ctx->mtc, &det_ctx->pmq,
p->payload, p->payload_len);