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

lvmetad: check id_read_format error status

Detect error from id_read_format() function.
This commit is contained in:
Zdenek Kabelac 2012-12-14 16:45:15 +01:00
parent ba3f37c9e4
commit e012d0635d
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
Check for failing id_read_format() in _pv_populate_lvmcache.
Fix memleak on error path for lvmetad's pv_found.
Unlock vg mutex in error path when lvmetad tries to lock_vg.
Add check for key string duplication in config_make_nodes_v.

7
lib/cache/lvmetad.c vendored
View File

@ -249,9 +249,10 @@ static struct lvmcache_info *_pv_populate_lvmcache(
return NULL;
}
if (vgid_txt)
id_read_format(&vgid, vgid_txt);
else
if (vgid_txt) {
if (!id_read_format(&vgid, vgid_txt))
return_NULL;
} else
strcpy((char*)&vgid, fmt->orphan_vg_name);
if (!vgname)