This patch fixes some crashes in NFCT plugin that were triggered
by the call of the destructor_nfct function (during stop).
static int destructor_nfct(struct ulogd_pluginstance *pi)
{
- struct nfct_pluginstance *cpi = (void *) pi;
+ struct nfct_pluginstance *cpi = (void *) pi->private;
int rc;
hashtable_destroy(cpi->ct_active);
void hashtable_destroy(struct hashtable *h)
{
- hashtable_flush(h);
- free(h);
+ if (h) {
+ hashtable_flush(h);
+ free(h);
+ }
}
void *hashtable_add(struct hashtable *table, void *data)