summaryrefslogtreecommitdiffstats
path: root/lib/thin/thin.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thin/thin.c')
-rw-r--r--lib/thin/thin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/thin/thin.c b/lib/thin/thin.c
index ccf0f8da..65b130b8 100644
--- a/lib/thin/thin.c
+++ b/lib/thin/thin.c
@@ -607,10 +607,9 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
segtype->flags |= SEG_MONITORED;
# endif /* DMEVENTD */
#endif
- if (!lvm_register_segtype(seglib, segtype)) {
- dm_free(segtype);
+ if (!lvm_register_segtype(seglib, segtype))
+ /* segtype is already destroyed */
return_0;
- }
log_very_verbose("Initialised segtype: %s", segtype->name);
}