Commit dd98ae15 authored by Joe Thornber's avatar Joe Thornber Committed by Trond Myklebust

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

Call dm_put_target_type() *after* calling the destructor.
parent adce4649
......@@ -250,12 +250,12 @@ void table_destroy(struct dm_table *t)
/* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment