From d40fb5b933c16c6fec5bac933c917d3efe61361e Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Mon, 5 Dec 2011 21:56:59 +0530 Subject: [PATCH] Remove unnecessary flow NULL check --- src/detect.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/detect.c b/src/detect.c index 8625780d4a..0c4a6dbb56 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1299,12 +1299,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh SCMutexLock(&p->flow->m); { /* set the iponly stuff */ - if (p->flow != NULL) { - if (p->flow->flags & FLOW_TOCLIENT_IPONLY_SET) - p->flowflags |= FLOW_PKT_TOCLIENT_IPONLY_SET; - if (p->flow->flags & FLOW_TOSERVER_IPONLY_SET) - p->flowflags |= FLOW_PKT_TOSERVER_IPONLY_SET; - } + if (p->flow->flags & FLOW_TOCLIENT_IPONLY_SET) + p->flowflags |= FLOW_PKT_TOCLIENT_IPONLY_SET; + if (p->flow->flags & FLOW_TOSERVER_IPONLY_SET) + p->flowflags |= FLOW_PKT_TOSERVER_IPONLY_SET; /* Get the stored sgh from the flow (if any). Make sure we're not using * the sgh for icmp error packets part of the same stream. */