diff --git a/src/viced/callback.c b/src/viced/callback.c index 0afd567963..cac19529fc 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -493,7 +493,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; } @@ -1030,6 +1030,7 @@ DeleteFileCallBacks(AFSFid * fid) TDel(cb); HDel(cb); FreeCB(cb); + fe->ncbs--; } FDel(fe); H_UNLOCK;