Skip to contentSkip to conversation

2018-06-01-stable - lvmlockd: fix another missing lock_type null check

PATCH David Teigland 1 participant 1 message Jun 21, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d4fd39f64c64fb180606b8b9202119fa9c11b35d
Commit:        d4fd39f64c64fb180606b8b9202119fa9c11b35d
Parent:        acb784e2a87f1a5b57e75c5b92b833306feca9af
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Jun 21 09:00:23 2018 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Jun 21 09:00:23 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(-)
lib/metadata/mirror.c +1 -1
index 25948ad..7f38d4f 100644
@@ -710,7 +710,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)) {