From 7806744084eddcbe7b7f7ffa46650e9e553db3d0 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 13:33:54 +0100 Subject: [PATCH] Aggregration plugin: plug leak on error CID #38005 Signed-off-by: Florian Forster --- src/aggregation.c | 1 + 1 file changed, 1 insertion(+) 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); \ } \ -- 2.30.2