Showing error 1507

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


Source:

513                int        bin;
514                long        hashv;
515                /*
516                 * Locate hashbin
517                 */
518                hashv = entry->q_hash;
519                bin = GET_HASHBIN( hashv );
520
521                /*
522                 * Dequeue the entry...
523                 */
524                dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ],
525                                 (irda_queue_t*) entry );
526                hashbin->hb_size--;
527                entry->q_next = NULL;
528                entry->q_prev = NULL;
529
530                /*
531                 *  Check if this item is the currently selected item, and in
532                 *  that case we must reset hb_current
533                 */
534                if ( entry == hashbin->hb_current)
535                        hashbin->hb_current = NULL;
536        }
537
538        /* Release lock */
539        if ( hashbin->hb_type & HB_LOCK ) {
540                spin_unlock_irqrestore(&hashbin->hb_spinlock, flags);
541        } /* Default is no-lock  */
542
543        return entry;
544}
545
546
547/*
548 *  Function hashbin_remove (hashbin, hashv, name)
549 *
550 *    Remove entry with the given name
551 *
552 *  The use of this function is highly discouraged, because the whole
553 *  concept behind hashbin_remove() is broken. In many cases, it's not
Show full sources