linux24-fix-path-leak-20010906
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Thu, 6 Sep 2001 20:07:12 +0000 (20:07 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 6 Sep 2001 20:07:12 +0000 (20:07 +0000)
based on suggestion from Srikanth and Chas Williams

src/afs/LINUX/osi_misc.c

index 2c3dc60..039e18d 100644 (file)
@@ -49,11 +49,10 @@ int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
 
     if (!code) {
        if (nd.dentry->d_inode) {
-           *dpp = nd.dentry;
+           *dpp = dget(nd.dentry);
            code = 0;
        }
-       else
-           path_release(&nd);
+       path_release(&nd);
     }
 #else
     if (seg == AFS_UIOUSER) {