浏览代码

pohmelfs: double-free and leak

wrong dentry dropped...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 14 年之前
父节点
当前提交
d93e34faf9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/pohmelfs/net.c

+ 1 - 1
drivers/staging/pohmelfs/net.c

@@ -413,7 +413,7 @@ static int pohmelfs_readdir_response(struct netfs_state *st)
 				if (dentry) {
 					alias = d_materialise_unique(dentry, &npi->vfs_inode);
 					if (alias)
-						dput(dentry);
+						dput(alias);
 				}
 
 				dput(dentry);