]> 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)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 29 Apr 2021 12:10:59 +0000 (17:40 +0530)
(cherry picked from commit 68d6922e3cc47c2608e1ac3614c6bd3a48185a12)

src/app-layer-expectation.c

index d7b470f53dfaaf0c8edc929bb50e7111adfe715a..00ff035db7413b9a614e513a77c9fcaa0dbcf23d 100644 (file)
@@ -324,7 +324,7 @@ AppProto AppLayerExpectationHandle(Flow *f, uint8_t flags)
             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);