From: Anoop Saldanha Date: Sun, 29 Sep 2013 16:45:21 +0000 (+0530) Subject: Fix a leak in app layer parser proto code. Free the proto signatures X-Git-Tag: suricata-2.0beta2~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=980934d670864c627c07a7c52966bda45df29e78;p=thirdparty%2Fsuricata.git Fix a leak in app layer parser proto code. Free the proto signatures allocated internally for PM parser. --- diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 18b8d7d2d3..e5f2d68e2d 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -2319,10 +2319,16 @@ void AppLayerRegisterProbingParser(AlpProtoDetectCtx *ctx, void AppLayerFreeProbingParsers(AppLayerProbingParser *pp) { + AppLayerProbingParser *tmp_pp = NULL; + if (pp == NULL) return; - DeAllocAppLayerProbingParser(pp); + while (pp != NULL) { + tmp_pp = pp->next; + DeAllocAppLayerProbingParser(pp); + pp = tmp_pp; + } return; }