diff options
Diffstat (limited to 'src/ipcpd')
-rw-r--r-- | src/ipcpd/normal/dht.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c index 6d291a35..affec434 100644 --- a/src/ipcpd/normal/dht.c +++ b/src/ipcpd/normal/dht.c @@ -2625,6 +2625,13 @@ void dht_destroy(struct dht * dht) pthread_rwlock_wrlock(&dht->lock); + list_for_each_safe(p, h, &dht->cmds) { + struct cmd * c = list_entry(p, struct cmd, next); + list_del(&c->next); + ipcp_sdb_release(c->sdb); + free(c); + } + list_for_each_safe(p, h, &dht->entries) { struct dht_entry * e = list_entry(p, struct dht_entry, next); list_del(&e->next); |