projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67100d8
)
snort plugin: Free md->instance in snort_metric_definition_destroy().
author
Florian Forster
<octo@collectd.org>
Tue, 26 Feb 2013 06:42:21 +0000
(07:42 +0100)
committer
Florian Forster
<octo@collectd.org>
Tue, 26 Feb 2013 06:42:21 +0000
(07:42 +0100)
src/snort.c
patch
|
blob
|
history
diff --git
a/src/snort.c
b/src/snort.c
index
3fb48b6
..
c3867c8
100644
(file)
--- 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);