From: Latchesar Ionkov Date: Mon, 28 Nov 2005 21:44:05 +0000 (-0800) Subject: [PATCH] v9fs: fix memory leak in v9fs dentry code X-Git-Tag: v2.6.15-rc3~15 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a93a117eaa0bec426d4671a49bfa96a6fdcd2ac9;p=~shefty%2Frdma-dev.git [PATCH] v9fs: fix memory leak in v9fs dentry code Assign the appropriate dentry operations to the dentry. Fixes memory leak. Signed-off-by: Latchesar Ionkov Cc: Eric Van Hensbergen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index be7288184fa..0ea965c3bb7 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -427,6 +427,8 @@ v9fs_create(struct inode *dir, v9fs_mistat2inode(fcall->params.rstat.stat, file_inode, sb); kfree(fcall); + fcall = NULL; + file_dentry->d_op = &v9fs_dentry_operations; d_instantiate(file_dentry, file_inode); if (perm & V9FS_DMDIR) {