--------------------- PatchSet 1239 Date: 2001/01/10 04:32:14 Author: rbcollins Branch: auth_digest Tag: (none) Log: null pointer reference fix Members: src/auth/digest/auth_digest.c:1.1.2.14->1.1.2.15 Index: squid/src/auth/digest/auth_digest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/digest/auth_digest.c,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- squid/src/auth/digest/auth_digest.c 9 Jan 2001 13:06:13 -0000 1.1.2.14 +++ squid/src/auth/digest/auth_digest.c 10 Jan 2001 04:32:14 -0000 1.1.2.15 @@ -214,14 +214,17 @@ * We empty the cache of any nonces left in there. */ digest_nonce_h *nonce; - debug(29,2)("authenticateDigestNonceShutdown: Shutting down nonce cache \n"); - hash_first(digest_nonce_cache); - while ((nonce=((digest_nonce_h *)hash_next(digest_nonce_cache)))) { - assert (nonce->flags.incache); - hash_remove_link(digest_nonce_cache, (hash_link *)nonce); - nonce->flags.incache=0; - /* the cache's link */ - authDigestNonceUnlink(nonce); + if (digest_nonce_cache) + { + debug(29,2)("authenticateDigestNonceShutdown: Shutting down nonce cache \n"); + hash_first(digest_nonce_cache); + while ((nonce=((digest_nonce_h *)hash_next(digest_nonce_cache)))) { + assert (nonce->flags.incache); + hash_remove_link(digest_nonce_cache, (hash_link *)nonce); + nonce->flags.incache=0; + /* the cache's link */ + authDigestNonceUnlink(nonce); + } } if (digest_nonce_pool) {