]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer-smtp: fix SMTPTransactionFree function
authorEric Leblond <eric@regit.org>
Wed, 29 Apr 2015 13:43:47 +0000 (15:43 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 30 Apr 2015 12:49:00 +0000 (14:49 +0200)
A typo was causing some freeing tasks not to be executed.

src/app-layer-smtp.c

index 90bc7d89fea96338f82951e16fccfe352836443a..bc6459ab83309072c2712182edc7ba1c99deb66d 100644 (file)
@@ -1126,8 +1126,9 @@ static void SMTPTransactionFree(SMTPTransaction *tx, SMTPState *state)
     /* Free list of MIME message recursively */
     MimeDecFreeEntity(tx->msg_head);
 
-    if (tx->decoder_events != NULL) {
+    if (tx->decoder_events != NULL)
         AppLayerDecoderEventsFreeEvents(&tx->decoder_events);
+
     if (tx->de_state != NULL)
         DetectEngineStateFree(tx->de_state);
 #if 0
@@ -1136,7 +1137,6 @@ static void SMTPTransactionFree(SMTPTransaction *tx, SMTPState *state)
         else
             smtp_state->events = 0;
 #endif
-    }
     SCFree(tx);
 }