Bug 12531

Summary: (Patch queued) arch/arm/mach-iop13xx/pci.c:1077: Memory leak: res
Product: Platform Specific/Hardware Reporter: Daniel Marjamäki (danielm77)
Component: ARMAssignee: Alan (alan)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: latest git tree Subsystem:
Regression: No Bisected commit-id:

Description Daniel Marjamäki 2009-01-23 22:16:53 UTC
In the function iop13xx_pci_setup the res is first allocated. And then further down there is a switch where the default case looks like this..

    default:
        return 0;

I suggest adding a kfree(res); before the return.

This leak was found by cppcheck - http://sourceforge.net/projects/cppcheck
Comment 1 Daniel Marjamäki 2009-01-30 02:18:45 UTC
Patch submitted and applied
Comment 2 Daniel Marjamäki 2009-01-30 02:23:53 UTC
Oops.. closed the wrong ticket
Comment 3 Alan 2009-03-20 06:16:29 UTC
Thanks - patch queued