]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: check id_read_format error status
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 14 Dec 2012 15:45:15 +0000 (16:45 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Sat, 15 Dec 2012 16:23:27 +0000 (17:23 +0100)
Detect error from id_read_format() function.

WHATS_NEW
lib/cache/lvmetad.c

index d535d1030ca9dc1b4ed9ece43a3031a3f520fa0f..2fc8acf0ee334ce4b26c89b74972dcfce9e05d9e 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
index 3ce28042bd61a2268fc8d92e5e9df2b117117e5e..67e083b3eeb6f172a4aa8ac0e111fbc10bceaede 100644 (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)
This page took 0.046082 seconds and 5 git commands to generate.