mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmetad: fix error paths
Also add missing goto out on error. Error path missed return NULL leading to double free of enc_value.
This commit is contained in:
parent
377e06b0f8
commit
f787b575b5
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.99 -
|
Version 2.02.99 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix lvmetad error path in lvmetad_vg_lookup() for null vgname.
|
||||||
Fix clvmd _cluster_request() return code in memory fail path.
|
Fix clvmd _cluster_request() return code in memory fail path.
|
||||||
Add writemostly/writebehind support for RAID1
|
Add writemostly/writebehind support for RAID1
|
||||||
Add lv_change_activate() for common activation code in vg/lvchange.
|
Add lv_change_activate() for common activation code in vg/lvchange.
|
||||||
|
4
lib/cache/lvmetad.c
vendored
4
lib/cache/lvmetad.c
vendored
@ -343,8 +343,10 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna
|
|||||||
reply = _lvmetad_send("vg_lookup", "uuid = %s", uuid, NULL);
|
reply = _lvmetad_send("vg_lookup", "uuid = %s", uuid, NULL);
|
||||||
diag_name = uuid;
|
diag_name = uuid;
|
||||||
} else {
|
} else {
|
||||||
if (!vgname)
|
if (!vgname) {
|
||||||
log_error(INTERNAL_ERROR "VG name required (VGID not available)");
|
log_error(INTERNAL_ERROR "VG name required (VGID not available)");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
log_debug_lvmetad("Asking lvmetad for VG %s", vgname);
|
log_debug_lvmetad("Asking lvmetad for VG %s", vgname);
|
||||||
reply = _lvmetad_send("vg_lookup", "name = %s", vgname, NULL);
|
reply = _lvmetad_send("vg_lookup", "name = %s", vgname, NULL);
|
||||||
diag_name = vgname;
|
diag_name = vgname;
|
||||||
|
@ -967,6 +967,7 @@ static struct dm_config_value *_get_def_array_values(struct dm_config_tree *cft,
|
|||||||
if (!(v = dm_config_create_value(cft))) {
|
if (!(v = dm_config_create_value(cft))) {
|
||||||
log_error("Failed to create default config array value for %s.", def->name);
|
log_error("Failed to create default config array value for %s.", def->name);
|
||||||
dm_free(enc_value);
|
dm_free(enc_value);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
if (oldv)
|
if (oldv)
|
||||||
oldv->next = v;
|
oldv->next = v;
|
||||||
|
Loading…
Reference in New Issue
Block a user