diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2013-07-19 17:31:13 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2013-07-22 12:41:21 +0200 |
commit | baada4316dd2fcf0383ed7bcfa539c0429e17131 (patch) | |
tree | acf1fbb33a139080f24388f27623df4022bc4056 | |
parent | dedec81d7b939650f390c0be5a23632b39d83012 (diff) | |
download | lvm2-baada4316dd2fcf0383ed7bcfa539c0429e17131.tar.gz |
liblvm: check lvmetad cache return values
Missing error path.
-rw-r--r-- | liblvm/lvm_vg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/liblvm/lvm_vg.c b/liblvm/lvm_vg.c index c128ba7ac..3f4968e9c 100644 --- a/liblvm/lvm_vg.c +++ b/liblvm/lvm_vg.c @@ -362,13 +362,17 @@ int lvm_vg_set_property(const vg_t vg, const char *name, struct dm_list *lvm_list_vg_names(lvm_t libh) { - lvmetad_vg_list_to_lvmcache((struct cmd_context *)libh); + if (!lvmetad_vg_list_to_lvmcache((struct cmd_context *)libh)) + return NULL; + return get_vgnames((struct cmd_context *)libh, 0); } struct dm_list *lvm_list_vg_uuids(lvm_t libh) { - lvmetad_vg_list_to_lvmcache((struct cmd_context *)libh); + if (!lvmetad_vg_list_to_lvmcache((struct cmd_context *)libh)) + return NULL; + return get_vgids((struct cmd_context *)libh, 0); } |