From: Florian Forster Date: Tue, 26 Feb 2013 06:42:21 +0000 (+0100) Subject: snort plugin: Free md->instance in snort_metric_definition_destroy(). X-Git-Tag: collectd-5.3.0~26^2~8 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=47f1214f85d7c9ea199f17d976dada4b49e328ce;p=collectd.git snort plugin: Free md->instance in snort_metric_definition_destroy(). --- 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);