]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Coverity 1038116 & 1038117: memory leaks on 'app-layer-event' keyword parsing failure
authorVictor Julien <victor@inliniac.net>
Tue, 25 Jun 2013 12:10:25 +0000 (14:10 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Jun 2013 12:10:25 +0000 (14:10 +0200)
src/detect-app-layer-event.c

index a2d4da40c7011f85c51210af4aa2026d608d4fae..aa59f33bb1f7e48cf7f60dc504e449a5cd2ee4fc 100644 (file)
@@ -164,7 +164,13 @@ int DetectAppLayerEventSetup(DetectEngineCtx *de_ctx, Signature *s, char *arg)
 
     return 0;
 
- error:
+error:
+    if (data)
+        SCFree(data);
+    if (sm) {
+        sm->ctx = NULL;
+        SigMatchFree(sm);
+    }
     return -1;
 }