summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-25 14:52:23 +0100
committerDavid Disseldorp <ddiss@suse.de>2013-03-05 23:29:53 +0100
commit157943fdfb47e6b72cb5596d6685152d0de328a7 (patch)
tree821a370f649de098761091de02955fcb0bbc2186
parentf06a0352e551ea125675659923c909d6d4c473fd (diff)
downloadsamba-157943fdfb47e6b72cb5596d6685152d0de328a7.tar.gz
samba-157943fdfb47e6b72cb5596d6685152d0de328a7.tar.bz2
samba-157943fdfb47e6b72cb5596d6685152d0de328a7.zip
krb5_wrap: Make sure we don't dereference a NULL pointer.
Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r--lib/krb5_wrap/krb5_samba.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index ffb3f8d00d..0876ab6284 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -1400,7 +1400,9 @@ krb5_error_code smb_krb5_get_credentials(krb5_context context,
krb5_error_code ret;
krb5_creds *creds = NULL;
- *out_creds = NULL;
+ if (out_creds != NULL) {
+ *out_creds = NULL;
+ }
if (impersonate_princ) {
#ifdef HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE /* Heimdal */