Skip to content

Commit

Permalink
PCI: eliminate double kfree in intel-iommu initialization
Browse files Browse the repository at this point in the history
The destination of goto error also does a kfree(g_iommus), so it is not
correct to do one here.

This was found using Coccinelle (http://www.emn.fr/x-info/coccinelle/).

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Julia Lawall authored and Jesse Barnes committed Jun 10, 2008
1 parent 6a3f084 commit ece6763
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,6 @@ int __init init_dmars(void)
deferred_flush = kzalloc(g_num_of_iommus *
sizeof(struct deferred_flush_tables), GFP_KERNEL);
if (!deferred_flush) {
kfree(g_iommus);
ret = -ENOMEM;
goto error;
}
Expand Down

0 comments on commit ece6763

Please sign in to comment.