projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaab2f5
)
lvm: Fix segfault if a VG contains no LVs
author
Benjamin Gilbert
<bgilbert@cs.cmu.edu>
Wed, 16 Apr 2014 20:27:07 +0000
(16:27 -0400)
committer
Benjamin Gilbert
<bgilbert@cs.cmu.edu>
Wed, 16 Apr 2014 20:27:07 +0000
(16:27 -0400)
src/lvm.c
patch
|
blob
|
history
diff --git
a/src/lvm.c
b/src/lvm.c
index
97d8017
..
cbf244b
100644
(file)
--- a/
src/lvm.c
+++ b/
src/lvm.c
@@
-119,6
+119,8
@@
static void vg_read(vg_t vg, char const *vg_name)
lvm_submit (vg_name, "free", lvm_vg_get_free_size(vg));
lvs = lvm_vg_list_lvs(vg);
+ if (lvs == NULL)
+ return;
dm_list_iterate_items(lvl, lvs) {
name = lvm_lv_get_name(lvl->lv);
attrs = lvm_lv_get_attr(lvl->lv);