From: Barry Naujok Date: Thu, 20 Nov 2008 14:22:02 +0000 (+0000) Subject: Fix libxfs_iput on a non-existent root inode during libxfs init X-Git-Tag: v3.0.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=841a8de64fe7f588888ff31db49c25ab02f72e96;p=thirdparty%2Fxfsprogs-dev.git Fix libxfs_iput on a non-existent root inode during libxfs init Merge of master-melb:xfs-cmds:32504a by kenmcd. Only do libxfs_iput on root inode if it's not NULL during libxfs init --- diff --git a/libxfs/init.c b/libxfs/init.c index 68eb288ed..75d043e53 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -670,7 +670,8 @@ libxfs_mount( ASSERT(mp->m_rootip != NULL); } if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) { - libxfs_iput(mp->m_rootip, 0); + if (mp->m_rootip) + libxfs_iput(mp->m_rootip, 0); return NULL; }