]> err.no Git - linux-2.6/commitdiff
[PATCH] v9fs: fix memory leak in v9fs dentry code
authorLatchesar Ionkov <lucho@ionkov.net>
Mon, 28 Nov 2005 21:44:05 +0000 (13:44 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 28 Nov 2005 22:42:25 +0000 (14:42 -0800)
Assign the appropriate dentry operations to the dentry. Fixes memory leak.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/9p/vfs_inode.c

index be7288184fa9de0a580f7ec64d86f29fec5d3ce3..0ea965c3bb7d0d7233e320a8957be96aaefb33ad 100644 (file)
@@ -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) {