summaryrefslogtreecommitdiff
path: root/lib/dns/gssapictx.c
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2013-07-24 07:12:55 +0000
committerErwin Lansing <erwin@FreeBSD.org>2013-07-24 07:12:55 +0000
commit6f34f6a389ca8199c4b20c17f62d7d924baef7fb (patch)
treee392027bf54f7a1fd2a6f3a16ecb4487844b44e9 /lib/dns/gssapictx.c
parent650b026006ec14e630f658a0f877099ec38b660b (diff)
Notes
Diffstat (limited to 'lib/dns/gssapictx.c')
-rw-r--r--lib/dns/gssapictx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/dns/gssapictx.c b/lib/dns/gssapictx.c
index ee5be561673b0..e4047d2521905 100644
--- a/lib/dns/gssapictx.c
+++ b/lib/dns/gssapictx.c
@@ -541,7 +541,7 @@ gss_err_message(isc_mem_t *mctx, isc_uint32_t major, isc_uint32_t minor,
}
estr = gss_error_tostring(major, minor, buf, sizeof(buf));
- if (estr)
+ if (estr != NULL)
(*err_message) = isc_mem_strdup(mctx, estr);
}
#endif
@@ -597,8 +597,12 @@ dst_gssapi_initctx(dns_name_t *name, isc_buffer_t *intoken,
if (gret != GSS_S_COMPLETE && gret != GSS_S_CONTINUE_NEEDED) {
gss_err_message(mctx, gret, minor, err_message);
- gss_log(3, "Failure initiating security context: %s",
- *err_message);
+ if (err_message != NULL && *err_message != NULL)
+ gss_log(3, "Failure initiating security context: %s",
+ *err_message);
+ else
+ gss_log(3, "Failure initiating security context");
+
result = ISC_R_FAILURE;
goto out;
}