summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ipt_ULOG.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/ipt_ULOG.c b/kernel/ipt_ULOG.c
index 369ee2e..d6e5162 100644
--- a/kernel/ipt_ULOG.c
+++ b/kernel/ipt_ULOG.c
@@ -29,7 +29,7 @@
* Specify, after how many clock ticks (intel: 100 per second) the queue
* should be flushed even if it is not full yet.
*
- * $Id: ipt_ULOG.c,v 1.15 2002/01/18 21:33:19 laforge Exp $
+ * $Id: ipt_ULOG.c,v 1.16 2002/02/13 07:14:53 laforge Exp $
*/
#include <linux/module.h>
@@ -339,8 +339,25 @@ static int __init init(void)
static void __exit fini(void)
{
+ struct ulog_buff_t *ub;
+ int i;
+
DEBUGP("ipt_ULOG: cleanup_module\n");
+ /* remove pending timers and free allocated skb's */
+ for (i = 0; i < ULOG_MAXNLGROUPS; i++) {
+ ub = &ulog_buffers[i];
+ if (timer_pending(&ub->timer)) {
+ DEBUGP("timer was pending, deleting\n");
+ del_timer(&ub->timer);
+ }
+
+ if (ub->skb) {
+ kfree_skb(ub->skb);
+ ub->skb = NULL;
+ }
+ }
+
ipt_unregister_target(&ipt_ulog_reg);
sock_release(nflognl->socket);
}