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: | 436 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-29 20:11:37 UTC |
406 * Free the entries in the hashbin, TODO: use hashbin_clear when 407 * it has been shown to work 408 */ 409 for (i = 0; i < HASHBIN_SIZE; i ++ ) { 410 queue = dequeue_first((irda_queue_t**) &hashbin->hb_queue[i]); 411 while (queue ) { 412 if (free_func) 413 (*free_func)(queue); 414 queue = dequeue_first( 415 (irda_queue_t**) &hashbin->hb_queue[i]); 416 } 417 } 418 419 /* Cleanup local data */ 420 hashbin->hb_current = NULL; 421 hashbin->magic = ~HB_MAGIC; 422 423 /* Release lock */ 424 if ( hashbin->hb_type & HB_LOCK) { 425 spin_unlock_irqrestore(&hashbin->hb_spinlock, flags); 426#ifdef CONFIG_LOCKDEP 427 hashbin_lock_depth--; 428#endif 429 } 430 431 /* 432 * Free the hashbin structure 433 */ 434 kfree(hashbin); 435 436 return 0; 437} 438EXPORT_SYMBOL(hashbin_delete); 439 440/********************* HASHBIN LIST OPERATIONS *********************/ 441 442/* 443 * Function hashbin_insert (hashbin, entry, name) 444 * 445 * Insert an entry into the hashbin 446 *