Written-by: Adam Tkac diff -up bind-9.5.0a6/lib/dns/spnego.h.free bind-9.5.0a6/lib/dns/spnego.h --- bind-9.5.0a6/lib/dns/spnego.h.free 2007-06-20 01:47:16.000000000 +0200 +++ bind-9.5.0a6/lib/dns/spnego.h 2007-08-22 14:32:13.000000000 +0200 @@ -67,5 +67,9 @@ OM_uint32 gss_accept_sec_context_spnego( OM_uint32 *, gss_cred_id_t *); +/* + * We have to export this because we need to free memory allocated by spnego_malloc + */ +void spnego_free(void *ptr, const char *file, int line); #endif diff -up bind-9.5.0a6/lib/dns/gssapictx.c.free bind-9.5.0a6/lib/dns/gssapictx.c --- bind-9.5.0a6/lib/dns/gssapictx.c.free 2007-06-20 01:47:16.000000000 +0200 +++ bind-9.5.0a6/lib/dns/gssapictx.c 2007-08-22 14:44:46.000000000 +0200 @@ -510,7 +510,11 @@ dst_gssapi_initctx(dns_name_t *name, isc RETERR(isc_buffer_copyregion(outtoken, &r)); (void)gss_release_name(&minor, &gname); +#ifdef USE_ISC_SPNEGO + spnego_free (gouttoken.value, __FILE__, __LINE__); +#else (void)gss_release_buffer(&minor, &gouttoken); +#endif if (gret == GSS_S_COMPLETE) result = ISC_R_SUCCESS; diff -up bind-9.5.0a6/lib/dns/spnego.c.free bind-9.5.0a6/lib/dns/spnego.c --- bind-9.5.0a6/lib/dns/spnego.c.free 2007-06-20 01:47:16.000000000 +0200 +++ bind-9.5.0a6/lib/dns/spnego.c 2007-08-22 14:32:13.000000000 +0200 @@ -201,7 +201,7 @@ spnego_malloc(size_t size, const char *f return (p); } -static void +void spnego_free(void *ptr, const char *file, int line) { char *p = ptr;