summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2008-11-29 21:07:08 +0100
committerEric Leblond <eric@inl.fr>2008-12-09 01:19:25 +0100
commit070b7f2f6af10d32ad6addfb9eb1aebb6545d511 (patch)
tree6353e750bcf9cdaf81ed0bc0b0b0d73fe101c5f8 /src
parenta2f317e7d764f54bc51d3962ed1761358bfa10d9 (diff)
Fix stop function of NFCT plugin.
This patch fixes some crashes in NFCT plugin that were triggered by the call of the destructor_nfct function (during stop).
Diffstat (limited to 'src')
-rw-r--r--src/hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hash.c b/src/hash.c
index 33541e8..700678c 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -75,8 +75,10 @@ hashtable_create(int hashsize, int limit, int datasize,
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)