1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix two potential NULL pointer derefs in error cases in vg_read().

This commit is contained in:
Alasdair Kergon 2006-09-21 20:25:54 +00:00
parent e0a266927d
commit 5095de5177
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.11 -
=====================================
Fix two potential NULL pointer derefs in error cases in vg_read().
Separate --enable-cluster from locking lib options in lvmconf.sh.
Add a missing comma in lvcreate man page.

View File

@ -1044,7 +1044,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
if (correct_vg) {
if (list_size(&correct_vg->pvs) != list_size(pvids)) {
log_debug("Cached VG %s had incorrect PV list",
vg->name);
vgname);
if (memlock())
inconsistent = 1;
@ -1053,7 +1053,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
} else list_iterate_items(pvl, &correct_vg->pvs) {
if (!str_list_match_item(pvids, pvl->pv->dev->pvid)) {
log_debug("Cached VG %s had incorrect PV list",
vg->name);
vgname);
correct_vg = NULL;
break;
}