pohmelfs: double-free and leak
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 17 Dec 2010 12:41:48 +0000 (07:41 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 13 Jan 2011 01:02:44 +0000 (20:02 -0500)
wrong dentry dropped...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/staging/pohmelfs/net.c

index 9279897..b2e9186 100644 (file)
@@ -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);