From 17c3bf7b225f6439419214f58d9e442959d5c32c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Thu, 1 Mar 2012 21:58:55 +0000 Subject: [PATCH] Check pointer before deref in debug message --- lib/cache/lvmcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 37c480de3..ccbb9b6cd 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -1110,8 +1110,8 @@ static int _lvmcache_update_vgid(struct lvmcache_info *info, if (!is_orphan_vg(vginfo->vgname)) log_debug("lvmcache: %s: setting %s VGID to %s", - dev_name(info->dev), vginfo->vgname, - vginfo->vgid); + (info) ? dev_name(info->dev) : "", + vginfo->vgname, vginfo->vgid); return 1; }