1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Print vg_name and do not to access vg->name

Reported by clang as: Logic error Dereference of null pointer
Replace pointer dereference with vg_name.
This commit is contained in:
Zdenek Kabelac 2010-10-25 12:01:38 +00:00
parent d80f8cf41b
commit 3cb3f15cf2
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.75 -
=====================================
Fix pointer for VG name in _pv_resize_single error code path.
Fix warning for changed alignment requirements for dmeventd read/write func.
Add global/metadata_read_only to use unrepaired metadata in read-only cmds.
Don't take write lock in vgchange --refresh, --poll or --monitor.

View File

@ -148,7 +148,7 @@ static int _pv_resize_single(struct cmd_context *cmd,
if (!is_orphan_vg(vg_name)) {
if (!vg_write(vg) || !vg_commit(vg)) {
log_error("Failed to store physical volume \"%s\" in "
"volume group \"%s\"", pv_name, vg->name);
"volume group \"%s\"", pv_name, vg_name);
goto out;
}
backup(vg);