summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/database.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 886c9a4..b3ffb7f 100644
--- a/src/database.c
+++ b/src/database.c
@@ -83,8 +83,10 @@ void db_destroy(void)
for (entry = database[i]; entry; entry = next) {
next = entry->ht_chain.next;
+ pthread_mutex_lock(&entry->mutex);
free(entry->revdns.data);
free(entry->whois.data);
+ pthread_mutex_unlock(&entry->mutex);
destroy_entry(entry);
}