Skip to content

Commit

Permalink
[IA64] arch/ia64/sn/pci/tioca_provider.c: introduce missing kfree
Browse files Browse the repository at this point in the history
Error handling code following a kmalloc should free the allocated data.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Julia Lawall authored and Tony Luck committed Sep 10, 2008
1 parent 47633cf commit 6bf6a1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/ia64/sn/pci/tioca_provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6bf6a1a

Please sign in to comment.