/*
- * $Id: cache_cf.cc,v 1.316 1998/12/15 18:22:40 wessels Exp $
+ * $Id: cache_cf.cc,v 1.317 1998/12/16 00:07:17 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
peer *p;
while ((p = *P) != NULL) {
*P = p->next;
+#if USE_CACHE_DIGESTS
+ if (p->digest)
+ cbdataUnlock(p->digest);
+ p->digest = NULL;
+#endif
cbdataFree(p);
}
Config.npeers = 0;
/*
- * $Id: neighbors.cc,v 1.265 1998/12/15 23:51:19 wessels Exp $
+ * $Id: neighbors.cc,v 1.266 1998/12/16 00:07:19 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
}
safe_free(p->host);
#if USE_CACHE_DIGESTS
- if (p->digest)
- cbdataUnlock(p->digest);
- p->digest = NULL;
+ /* it should be set NULL in free_peer() */
+ assert(p->digest == NULL);
#endif
xfree(p);
}
/*
- * $Id: peer_digest.cc,v 1.65 1998/12/15 23:51:20 wessels Exp $
+ * $Id: peer_digest.cc,v 1.66 1998/12/16 00:07:20 wessels Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
else
debug(72, 2) ("received valid digest from %s\n", host);
}
+ fetch->pd = NULL;
cbdataUnlock(pd);
}
requestUnlink(fetch->request);
fetch->entry = NULL;
fetch->request = NULL;
+ assert(fetch->pd == NULL);
cbdataUnlock(fetch);
cbdataFree(fetch);
}