Skip to contentSkip to conversation

LVM2/lib/cache lvmcache.c

PATCH [email protected] 1 participant 1 message Apr 21, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-04-21 13:15:26

Modified files:
lib/cache : lvmcache.c

Log message:
Skip check for NULL before dm_free

dm_free makes this test itself.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.109&r2=1.110

lib/cache/lvmcache.c +2 -5
@@ -857,11 +857,8 @@
 		}
  	while ((vginfo2 = vginfo2->next));
 
-	if (vginfo->vgname)
-		dm_free(vginfo->vgname);
-
-	if (vginfo->creation_host)
-		dm_free(vginfo->creation_host);
+	dm_free(vginfo->vgname);
+	dm_free(vginfo->creation_host);
 
 	if (*vginfo->vgid && _vgid_hash &&
 	    vginfo_from_vgid(vginfo->vgid) == vginfo)