[PATCH] dm: cleanup: remove the unnecessary NULL set to the local var *t after kfreed in dm_table_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If allocation fails, the local var *t is not used any more after kfreed.
Don't need to reset it to NULL. Remove the unnecesary NULL set here.

Signed-off-by: Wang Sheng-Hui <shhuiw@xxxxxxxxx>
---
 drivers/md/dm-table.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index daf25d0..c95405d 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -217,7 +217,6 @@ int dm_table_create(struct dm_table **result, fmode_t mode,

     if (alloc_targets(t, num_targets)) {
         kfree(t);
-        t = NULL;
         return -ENOMEM;
     }

--
1.7.10.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux