Skip to contentSkip to conversation

v9fs: fix memory leak in v9fs dentry code

PATCH New Latchesar Ionkov 1 participant 1 message Nov 26, 2005 9P file system

lore
Share & tools
lore

Latchesar Ionkov

author maintainer
#0 lore raw

PATCH 1/1 v9fs: fix memory leak in v9fs dentry code

Assign the appropriate dentry operations to the dentry. Fixes memory leak.

---
commit 1a6e02daf77d610278380537ff3f5687a205dac8
tree 3b53740d44c07d4c8db4e0a0df11794697ab9549
parent 2d0ebb36038c0626cde662a3b06da9787cfb68c3
author Latchesar Ionkov <[email protected]> Sat, 26 Nov 2005 10:39:47 -0500 committer Latchesar Ionkov <[email protected]> Sat, 26 Nov 2005 10:39:47 -0500

 fs/9p/vfs_inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/9p/vfs_inode.c +2 -0
@@ -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) {