Skip to content

Commit

Permalink
[ARM] fix leak in iop13xx/pci
Browse files Browse the repository at this point in the history
Another leak found by Daniel Marjamäki

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Alan Cox authored and Russell King committed Mar 24, 2009
1 parent ecbf61e commit b23c7a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/mach-iop13xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
which_atu = 0;
}

if (!which_atu)
if (!which_atu) {
kfree(res);
return 0;
}

switch(which_atu) {
case IOP13XX_INIT_ATU_ATUX:
Expand Down Expand Up @@ -1074,6 +1076,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
sys->map_irq = iop13xx_pcie_map_irq;
break;
default:
kfree(res);
return 0;
}

Expand Down

0 comments on commit b23c7a4

Please sign in to comment.