diff --git a/src/aggregation.c b/src/aggregation.c
index 0c0f19d6fe1585301443754bf6bc8933511d8bc5..56e4955c247d3a4d8252d44e21b2f58d3e2be7bc 100644 (file)
--- a/src/aggregation.c
+++ b/src/aggregation.c
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); \
} \
/* lookup_class_callback_t for utils_vl_lookup */
static void *agg_lookup_class_callback ( /* {{{ */
- __attribute__((unused)) data_set_t const *ds,
- value_list_t const *vl, void *user_class)
+ data_set_t const *ds, value_list_t const *vl, void *user_class)
{
return (agg_instance_create (ds, vl, (aggregation_t *) user_class));
} /* }}} void *agg_class_callback */