summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-09-28 13:29:55 -0500
committerDavid Teigland <teigland@redhat.com>2016-09-28 13:29:55 -0500
commit49a1c4d4b0f2c5fbc83a1ad4bfde59a366049b2a (patch)
tree71db914d5761f7ce877a4eb9ecdb9fe39bb16dac
parentbd96036835e088de6a59811834b5fa0747274a62 (diff)
downloadlvm2-49a1c4d4b0f2c5fbc83a1ad4bfde59a366049b2a.tar.gz
lvmlockd: fix segfault in error path
The log_debug statement was ignoring the NULL vg error case.
-rw-r--r--lib/cache/lvmetad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 727d3d399..8e9bb1fd3 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -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;
}