]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ftp: fixes leak with duplicate expectation
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 8 Apr 2021 15:44:01 +0000 (17:44 +0200)
committerJeff Lucovsky <jeff@lucovsky.org>
Thu, 29 Apr 2021 13:07:57 +0000 (09:07 -0400)
(cherry picked from commit 68d6922e3cc47c2608e1ac3614c6bd3a48185a12)

src/app-layer-expectation.c

index e8d4c6af6792cd1b1028373a7389860047a403f8..ee158e94d28560fa8ac49736806b7867f68f03ec 100644 (file)
@@ -325,7 +325,7 @@ AppProto AppLayerExpectationHandle(Flow *f, int direction)
             alproto = exp->alproto;
             f->alproto_ts = alproto;
             f->alproto_tc = alproto;
-            void *fdata = FlowGetStorageById(f, g_expectation_id);
+            void *fdata = FlowGetStorageById(f, g_expectation_data_id);
             if (fdata) {
                 /* We already have an expectation so let's clean this one */
                 ExpectationDataFree(exp->data);