Showing error 1559

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


Source:

195
196        return 0;
197
198}
199
200#endif /* CONFIG_KEYS_DEBUG_PROC_KEYS */
201
202/*****************************************************************************/
203/*
204 * implement "/proc/key-users" to provides a list of the key users
205 */
206static int proc_key_users_open(struct inode *inode, struct file *file)
207{
208        return seq_open(file, &proc_key_users_ops);
209
210}
211
212static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
213{
214        struct rb_node *_p;
215        loff_t pos = *_pos;
216
217        spin_lock(&key_user_lock);
218
219        _p = rb_first(&key_user_tree);
220        while (pos > 0 && _p) {
221                pos--;
222                _p = rb_next(_p);
223        }
224
225        return _p;
226
227}
228
229static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos)
230{
231        (*_pos)++;
232        return rb_next((struct rb_node *) v);
233
234}
235
Show full sources