darwin80-mkdir-error-leak-fix-20060215
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Wed, 15 Feb 2006 07:01:40 +0000 (07:01 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 15 Feb 2006 07:01:40 +0000 (07:01 +0000)
avoid a potential refcount decrement "leak" (well, the opposite, really) when a mkdir fails

src/afs/DARWIN/osi_vnodeops.c

index d7c5d1d..e73c0a7 100644 (file)
@@ -1430,8 +1430,10 @@ afs_vop_mkdir(ap)
     error = afs_mkdir(VTOAFS(dvp), name, vap, &vcp, vop_cn_cred);
     AFS_GUNLOCK();
     if (error) {
+#ifndef AFS_DARWIN80_ENV
        VOP_ABORTOP(dvp, cnp);
        vput(dvp);
+#endif
        DROPNAME();
        return (error);
     }