Skip to contentSkip to conversation

LVM2/lib/commands toolcontext.c

PATCH [email protected] 1 participant 1 message Feb 8, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-02-08 13:44:50

Modified files:
lib/commands : toolcontext.c

Log message:
Move label_init up in code stack

label_exit() is called destroy_toolcontext() and we are now using standard dm_list function for destroy, we have to make sure dm_list gets initialized properly.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.149&r2=1.150

lib/commands/toolcontext.c +1 -2
@@ -896,8 +896,6 @@
 	const struct dm_config_node *cn;
 #endif
 
-	label_init();
-
 #ifdef LVM1_INTERNAL
 	if (!(fmt = init_lvm1_format(cmd)))
 		return 0;
@@ -1268,6 +1266,7 @@
 	dm_list_init(&cmd->segtypes);
 	dm_list_init(&cmd->tags);
 	dm_list_init(&cmd->config_files);
+	label_init();
 
 	/* FIXME Make this configurable? */
 	reset_lvm_errno(1);