Showing error 1456

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


Source:

136        }
137
138        rt = v;
139        seq_printf(seq, "%04X:%02X     %04X:%02X  %-4d  %s\n",
140                   ntohs(rt->target.s_net), rt->target.s_node,
141                   ntohs(rt->gateway.s_net), rt->gateway.s_node,
142                   rt->flags, rt->dev->name);
143out:
144        return 0;
145}
146
147static __inline__ struct sock *atalk_get_socket_idx(loff_t pos)
148{
149        struct sock *s;
150        struct hlist_node *node;
151
152        sk_for_each(s, node, &atalk_sockets)
153                if (!pos--)
154                        goto found;
155        s = NULL;
156found:
157        return s;
158}
159
160static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
161        __acquires(atalk_sockets_lock)
162{
163        loff_t l = *pos;
164
165        read_lock_bh(&atalk_sockets_lock);
166        return l ? atalk_get_socket_idx(--l) : SEQ_START_TOKEN;
167}
168
169static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
170{
171        struct sock *i;
172
173        ++*pos;
174        if (v == SEQ_START_TOKEN) {
175                i = sk_head(&atalk_sockets);
176                goto out;
Show full sources