From 47f1214f85d7c9ea199f17d976dada4b49e328ce Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 26 Feb 2013 07:42:21 +0100 Subject: [PATCH] snort plugin: Free md->instance in snort_metric_definition_destroy(). --- src/snort.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/snort.c b/src/snort.c index 3fb48b6b..c3867c81 100644 --- a/src/snort.c +++ b/src/snort.c @@ -235,6 +235,7 @@ static void snort_metric_definition_destroy(void *arg){ sfree(md->name); sfree(md->type); + sfree(md->instance); sfree(md); } @@ -264,8 +265,11 @@ static int snort_config_add_metric(oconfig_item_t *ci){ if (md == NULL) return (-1); memset(md, 0, sizeof(*md)); - md->name = NULL; + md->type = NULL; + md->instance = NULL; + md->next = NULL; + status = cf_util_get_string (ci, &md->name); if (status != 0) { sfree (md); -- 2.11.0