Bug 12531 - (Patch queued) arch/arm/mach-iop13xx/pci.c:1077: Memory leak: res
Summary: (Patch queued) arch/arm/mach-iop13xx/pci.c:1077: Memory leak: res
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: ARM (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-23 22:16 UTC by Daniel Marjamäki
Modified: 2009-04-08 10:01 UTC (History)
0 users

See Also:
Kernel Version: latest git tree
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.