This only happens during the configuration parsing. First leak is the string
representing the last converter parsed, if any. The second one is on the error
path, when the allocation of the ACL expression failed. In this case, the sample
was not released.
This patch fixes the issue #256. It must be backported to all stable versions.
goto out_free_smp;
}
}
+ free(ckw);
+ ckw = NULL;
}
else {
/* This is not an ACL keyword, so we hope this is a sample fetch
expr = calloc(1, sizeof(*expr));
if (!expr) {
memprintf(err, "out of memory when parsing ACL expression");
- goto out_return;
+ goto out_free_smp;
}
pattern_init_head(&expr->pat);
out_free_expr:
prune_acl_expr(expr);
free(expr);
- free(ckw);
out_free_smp:
+ free(ckw);
free(smp);
out_return:
return NULL;