Showing error 1526

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/nfnetlink_log.c
Line in file: 882
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

852        return NULL;
853}
854
855static struct hlist_node *get_next(struct iter_state *st, struct hlist_node *h)
856{
857        h = h->next;
858        while (!h) {
859                if (++st->bucket >= INSTANCE_BUCKETS)
860                        return NULL;
861
862                h = instance_table[st->bucket].first;
863        }
864        return h;
865}
866
867static struct hlist_node *get_idx(struct iter_state *st, loff_t pos)
868{
869        struct hlist_node *head;
870        head = get_first(st);
871
872        if (head)
873                while (pos && (head = get_next(st, head)))
874                        pos--;
875        return pos ? NULL : head;
876}
877
878static void *seq_start(struct seq_file *seq, loff_t *pos)
879        __acquires(instances_lock)
880{
881        read_lock_bh(&instances_lock);
882        return get_idx(seq->private, *pos);
883}
884
885static void *seq_next(struct seq_file *s, void *v, loff_t *pos)
886{
887        (*pos)++;
888        return get_next(s->private, v);
889}
890
891static void seq_stop(struct seq_file *s, void *v)
892        __releases(instances_lock)
Show full sources