Skip to contentSkip to conversation

master - lvmlockd: fix segfault in error path

PATCH David Teigland 1 participant 1 message Sep 28, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=49a1c4d4b0f2c5fbc83a1ad4bfde59a366049b2a
Commit:        49a1c4d4b0f2c5fbc83a1ad4bfde59a366049b2a
Parent:        bd96036835e088de6a59811834b5fa0747274a62
Author:        David Teigland <[email protected]>
AuthorDate:    Wed Sep 28 13:29:55 2016 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Wed Sep 28 13:29:55 2016 -0500

lvmlockd: fix segfault in error path

The log_debug statement was ignoring the NULL vg error case.

---
 lib/cache/lvmetad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
lib/cache/lvmetad.c +2 -1
index 727d3d3..8e9bb1f 100644
@@ -2061,7 +2061,8 @@ scan_more:
 		dm_config_destroy(vgmeta_ret);
 	}
 out:
-	log_debug_lvmetad("Rescan VG %s done (seqno %u).", vg_ret->name, vg_ret->seqno);
+	if (vg_ret)
+		log_debug_lvmetad("Rescan VG %s done (seqno %u).", vg_ret->name, vg_ret->seqno);
 	return vg_ret;
 }