From: Julia Lawall Date: Wed, 10 Sep 2008 11:57:19 +0000 (+0200) Subject: [IA64] arch/ia64/sn/pci/tioca_provider.c: introduce missing kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bf6a1a49377c32a02939ec835553703994f3e41;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [IA64] arch/ia64/sn/pci/tioca_provider.c: introduce missing kfree Error handling code following a kmalloc should free the allocated data. Signed-off-by: Julia Lawall Signed-off-by: Tony Luck --- diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index 529462c01570..79165122501c 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c @@ -420,8 +420,10 @@ tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size) entry = find_next_zero_bit(map, mapsize, last_entry); } - if (entry > mapsize) + if (entry > mapsize) { + kfree(ca_dmamap); goto map_return; + } for (i = 0; i < entries; i++) set_bit(entry + i, map);