summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/normal/pff.c')
-rw-r--r--src/ipcpd/normal/pff.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ipcpd/normal/pff.c b/src/ipcpd/normal/pff.c
index 2f7d554b..8cab7936 100644
--- a/src/ipcpd/normal/pff.c
+++ b/src/ipcpd/normal/pff.c
@@ -3,7 +3,8 @@
*
* PDU Forwarding Function
*
- * Sander Vrijders <[email protected]>
+ * Dimitri Staessens <[email protected]>
+ * Sander Vrijders <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -55,15 +56,16 @@ struct pff * pff_create(void)
return tmp;
}
-int pff_destroy(struct pff * instance)
+void pff_destroy(struct pff * instance)
{
assert(instance);
+ pthread_mutex_lock(&instance->lock);
htable_destroy(instance->table);
+ pthread_mutex_unlock(&instance->lock);
+
pthread_mutex_destroy(&instance->lock);
free(instance);
-
- return 0;
}
int pff_add(struct pff * instance, uint64_t addr, int fd)