$NetBSD: patch-bj,v 1.1 2008/06/07 23:58:11 tonnerre Exp $

--- kdc/dispatch.c.orig	2002-09-11 05:59:26.000000000 +0200
+++ kdc/dispatch.c
@@ -108,7 +108,7 @@ dispatch(krb5_data *pkt, const krb5_full
 	retval = KRB5KRB_AP_ERR_MSG_TYPE;
 #ifndef NOCACHE
     /* put the response into the lookaside buffer */
-    if (!retval)
+    if (!retval && *response != NULL)
 	kdc_insert_lookaside(pkt, from, *response);
 #endif
 
