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

Joe Thornber (joe@fib011235813.fsnet.co.uk)
Wed, 8 Jan 2003 09:57:06 +0000


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/