[PATCH 5/10] dm: Call dm_put_target_type() *after* calling the destructor

From: Joe Thornber (joe@fib011235813.fsnet.co.uk)
Date: Wed Jan 08 2003 - 04:57:06 EST


Call dm_put_target_type() *after* calling the destructor.
--- diff/drivers/md/dm-table.c 2002-12-30 10:17:13.000000000 +0000
+++ source/drivers/md/dm-table.c 2003-01-02 11:26:35.000000000 +0000
@@ -250,12 +250,12 @@
 
         /* free the targets */
         for (i = 0; i < t->num_targets; i++) {
- struct dm_target *tgt = &t->targets[i];
-
- dm_put_target_type(t->targets[i].type);
+ struct dm_target *tgt = t->targets + i;
 
                 if (tgt->type->dtr)
                         tgt->type->dtr(tgt);
+
+ dm_put_target_type(tgt->type);
         }
 
         vfree(t->highs);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:22 EST