From: Philippe Antoine Date: Thu, 8 Apr 2021 15:44:01 +0000 (+0200) Subject: ftp: fixes leak with duplicate expectation X-Git-Tag: suricata-5.0.7~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f57dbb800ae5362de0d18e8632ba2e770a83a57f;p=thirdparty%2Fsuricata.git ftp: fixes leak with duplicate expectation (cherry picked from commit 68d6922e3cc47c2608e1ac3614c6bd3a48185a12) --- diff --git a/src/app-layer-expectation.c b/src/app-layer-expectation.c index e8d4c6af67..ee158e94d2 100644 --- a/src/app-layer-expectation.c +++ b/src/app-layer-expectation.c @@ -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);