summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/crypto/gse_krb5.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/librpc/crypto/gse_krb5.c b/source3/librpc/crypto/gse_krb5.c
index dbcc520048..43f545ad4c 100644
--- a/source3/librpc/crypto/gse_krb5.c
+++ b/source3/librpc/crypto/gse_krb5.c
@@ -96,7 +96,10 @@ static krb5_error_code get_host_principal(krb5_context krbctx,
return -1;
}
- strlower_m(host_princ_s);
+ if (!strlower_m(host_princ_s)) {
+ SAFE_FREE(host_princ_s);
+ return -1;
+ }
ret = smb_krb5_parse_name(krbctx, host_princ_s, host_princ);
if (ret) {
DEBUG(1, (__location__ ": smb_krb5_parse_name(%s) "