Showing error 1533

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: net/netfilter/xt_recent.c
Line in file: 392
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

362#ifdef CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT
363                remove_proc_entry(t->name, proc_old_dir);
364#endif
365                remove_proc_entry(t->name, recent_proc_dir);
366#endif
367                recent_table_flush(t);
368                kfree(t);
369        }
370        mutex_unlock(&recent_mutex);
371}
372
373#ifdef CONFIG_PROC_FS
374struct recent_iter_state {
375        const struct recent_table *table;
376        unsigned int                bucket;
377};
378
379static void *recent_seq_start(struct seq_file *seq, loff_t *pos)
380        __acquires(recent_lock)
381{
382        struct recent_iter_state *st = seq->private;
383        const struct recent_table *t = st->table;
384        struct recent_entry *e;
385        loff_t p = *pos;
386
387        spin_lock_bh(&recent_lock);
388
389        for (st->bucket = 0; st->bucket < ip_list_hash_size; st->bucket++)
390                list_for_each_entry(e, &t->iphash[st->bucket], list)
391                        if (p-- == 0)
392                                return e;
393        return NULL;
394}
395
396static void *recent_seq_next(struct seq_file *seq, void *v, loff_t *pos)
397{
398        struct recent_iter_state *st = seq->private;
399        const struct recent_table *t = st->table;
400        const struct recent_entry *e = v;
401        const struct list_head *head = e->list.next;
402
Show full sources