[lvm-devel] master - lvmlockd: clear coverity complaint

David Teigland teigland at sourceware.org
Wed Dec 6 16:49:47 UTC 2017


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=54154dc6f11ae869228cf9f36dc5ae919e861caa
Commit:        54154dc6f11ae869228cf9f36dc5ae919e861caa
Parent:        0f0f6978e76f2ee55da51b378d951f6e81d7e32d
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Wed Dec 6 10:48:32 2017 -0600
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Wed Dec 6 10:49:31 2017 -0600

lvmlockd: clear coverity complaint

---
 lib/locking/lvmlockd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index eb7076c..0365797 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -2163,7 +2163,8 @@ static int _lockd_lv_thin(struct cmd_context *cmd, struct logical_volume *lv,
 
 	} else if (lv_is_thin_pool_metadata(lv)) {
 		struct lv_segment *pool_seg = get_only_segment_using_this_lv(lv);
-		pool_lv = pool_seg->lv;
+		if (pool_seg)
+			pool_lv = pool_seg->lv;
 
 	} else {
 		/* This should not happen AFAIK. */




More information about the lvm-devel mailing list