[lvm-devel] master - lvmlockd: fix another missing lock_type null check

David Teigland teigland at sourceware.org
Thu Jun 21 14:26:11 UTC 2018


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e166d2b14ca22ead559a5898cc229ecbcc261007
Commit:        e166d2b14ca22ead559a5898cc229ecbcc261007
Parent:        40c1f7889fd88ce4a2f2b42c594db3deb8f84593
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Thu Jun 21 09:00:23 2018 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Thu Jun 21 09:24:51 2018 -0500

lvmlockd: fix another missing lock_type null check

Same as 347c807f8.
---
 lib/metadata/mirror.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index 11f2a8f..58615d8 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -698,7 +698,7 @@ static int _split_mirror_images(struct logical_volume *lv,
 		return 0;
 	}
 
-	if (!strcmp(lv->vg->lock_type, "dlm"))
+	if (lv->vg->lock_type && !strcmp(lv->vg->lock_type, "dlm"))
 		new_lv->lock_args = lv->lock_args;
 
 	if (!dm_list_empty(&split_images)) {




More information about the lvm-devel mailing list