]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-viced-accurately-track-file-callbacks-20071112
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 12 Nov 2007 19:07:06 +0000 (19:07 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 12 Nov 2007 19:07:06 +0000 (19:07 +0000)
FIXES 74708

this should fix the issue with cbfree being corrupted. a more exhaustive pointer-blunting patch should probably be pulled in, but, this is simple and obvious

(cherry picked from commit d284c0e7c11e8ee4755ac152e5e47d4abf304afc)

src/viced/callback.c

index 3be060bf770cc724c9aea0dd3d1644df369cb5fe..b528831a80ec3e24ae4b88530532381b6bfc1ae7 100644 (file)
@@ -487,7 +487,7 @@ CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
        CcdelB++;
     *cbp = cb->cnext;
     FreeCB(cb);
-    if (deletefe && (--fe->ncbs == 0))
+    if ((--fe->ncbs == 0) && deletefe)
        FDel(fe);
     return 0;
 }
@@ -1024,6 +1024,7 @@ DeleteFileCallBacks(AFSFid * fid)
        TDel(cb);
        HDel(cb);
        FreeCB(cb);
+       fe->ncbs--;
     }
     FDel(fe);
     H_UNLOCK;