Showing error 1457

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: 35
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

  5 *
  6 *        This program is free software; you can redistribute it and/or modify it
  7 *        under the terms of the GNU General Public License as published by the
  8 *        Free Software Foundation, version 2.
  9 */
 10
 11#include <linux/init.h>
 12#include <linux/proc_fs.h>
 13#include <linux/seq_file.h>
 14#include <net/net_namespace.h>
 15#include <net/sock.h>
 16#include <linux/atalk.h>
 17
 18
 19static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos)
 20{
 21        struct atalk_iface *i;
 22
 23        for (i = atalk_interfaces; pos && i; i = i->next)
 24                --pos;
 25
 26        return i;
 27}
 28
 29static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos)
 30        __acquires(atalk_interfaces_lock)
 31{
 32        loff_t l = *pos;
 33
 34        read_lock_bh(&atalk_interfaces_lock);
 35        return l ? atalk_get_interface_idx(--l) : SEQ_START_TOKEN;
 36}
 37
 38static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos)
 39{
 40        struct atalk_iface *i;
 41
 42        ++*pos;
 43        if (v == SEQ_START_TOKEN) {
 44                i = NULL;
 45                if (atalk_interfaces)
Show full sources