]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fix flow deadlock issue in detection engine state introduced by tx api.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Sat, 20 Oct 2012 14:31:52 +0000 (20:01 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 23 Oct 2012 16:16:14 +0000 (18:16 +0200)
Issue discovered by coverity.

src/detect-engine-state.c

index a6fc7a994868b89491cf2daf044c2da6143e3ff3..f8b8ce854bc707d7b8ec14d4910426cee991b671 100644 (file)
@@ -665,13 +665,13 @@ int DeStateDetectContinueDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, Dete
                 if (htp_state->connp == NULL || htp_state->connp->conn == NULL) {
                     SCLogDebug("HTP state has no conn(p)");
                     FLOWLOCK_UNLOCK(f);
-                    SCReturnInt(0);
+                    goto end;
                 }
 
                 int tx_id = AppLayerTransactionGetInspectId(f);
                 if (tx_id == -1) {
                     FLOWLOCK_UNLOCK(f);
-                    SCReturnInt(0);
+                    goto end;
                 }
 
                 int total_txs = (int)list_size(htp_state->connp->conn->transactions);