]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect ports: fix memory leak
authorVictor Julien <victor@inliniac.net>
Mon, 29 Feb 2016 08:37:04 +0000 (09:37 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Mar 2016 07:54:42 +0000 (08:54 +0100)
Fix mem leak on rules that contained ports like "![21,25,119]".

src/detect-engine-port.c

index 6d3d5208eb48f55b88ad58df3dfa416fc3cb2a24..1c9c0228f7c115d1a93fa333553fb95c05c97239 100644 (file)
@@ -1275,7 +1275,7 @@ int DetectPortParseMergeNotPorts(DetectPort **head, DetectPort **nhead)
         /** work with a copy of the ad so we can easily clean up
          * the ghn group later.
          */
-        ad = DetectPortCopy(NULL, ag);
+        ad = DetectPortCopySingle(NULL, ag);
         if (ad == NULL) {
             goto error;
         }