Size: 660
Comment:
|
← Revision 3 as of 2017-12-30 01:30:06 ⇥
Size: 660
Comment: converted to 1.6 markup
|
No differences found! |
Make sure calls to certain functions are matched by the relevant function at other end of the function, and also during ALL failure/early return paths.
Examples:
- pci_alloc_consistent() and pci_free_consistent()
- ioremap() must be balanced by an iounmap() (this causes a memory leak).
- check for balanced *_lock_* and *_unlock_* along all paths in a function
- (can cause dead-lock if not).
- Make sure no-one is freeing skbs with kfree instead of kfree_skb
- check that net_device interrupt functions use dev_kfree_skb_irq and not just dev_kfree_skb
- Make sure reference counts are not leaked by accident. (forgetting to fput(), ...)