From: Ruben Kerkhof Date: Sat, 5 Dec 2015 12:33:54 +0000 (+0100) Subject: Aggregration plugin: plug leak on error X-Git-Tag: collectd-5.5.1~25^2~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7806744084eddcbe7b7f7ffa46650e9e553db3d0;p=collectd.git Aggregration plugin: plug leak on error CID #38005 Signed-off-by: Florian Forster --- diff --git a/src/aggregation.c b/src/aggregation.c index 8175c66c..56e4955c 100644 --- a/src/aggregation.c +++ b/src/aggregation.c @@ -262,6 +262,7 @@ static agg_instance_t *agg_instance_create (data_set_t const *ds, /* {{{ */ inst->state_ ## field = malloc (sizeof (*inst->state_ ## field)); \ if (inst->state_ ## field == NULL) { \ agg_instance_destroy (inst); \ + free (inst); \ ERROR ("aggregation plugin: malloc() failed."); \ return (NULL); \ } \