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

Add missing test for failure of lvmcache_foreach_pv

This commit is contained in:
Zdenek Kabelac 2012-02-13 10:58:20 +00:00
parent f9411bb2af
commit 960ee343f3
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.92 -
====================================
Check for foreach loop errors in _vg_read_orphans() (2.02.91).
Clean error paths for format instance creation (2.02.91).
Release vg in error path of _format1_vg_read() instead of just free().
Report allocation failure for allocation of PV structure.

View File

@ -2754,7 +2754,9 @@ static struct volume_group *_vg_read_orphans(struct cmd_context *cmd,
baton.warnings = warnings;
baton.vg = vg;
lvmcache_foreach_pv(vginfo, _vg_read_orphan_pv, &baton);
if (!lvmcache_foreach_pv(vginfo, _vg_read_orphan_pv, &baton))
return_NULL;
return vg;
}