intel-iommu: double kfree()
authorDan Carpenter <error27@gmail.com>
Sun, 19 Jul 2009 11:47:45 +0000 (14:47 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 20 Jul 2009 04:01:20 +0000 (05:01 +0100)
g_iommus is freed after we "goto error;".

Found by smatch (http://repo.or.cz/w/smatch.git).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c

index 86a8394..097d5da 100644 (file)
@@ -2224,7 +2224,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;
        }