summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifsinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clifsinfo.c')
-rw-r--r--source3/libsmb/clifsinfo.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index fb923378ab..0005c3908a 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -368,20 +368,16 @@ static struct smb_trans_enc_state *make_cli_enc_state(enum smb_trans_enc_type sm
ZERO_STRUCTP(es);
es->smb_enc_type = smb_enc_type;
- if (smb_enc_type == SMB_TRANS_ENC_GSS) {
#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5)
+ if (smb_enc_type == SMB_TRANS_ENC_GSS) {
es->s.gss_state = SMB_MALLOC_P(struct smb_tran_enc_state_gss);
if (!es->s.gss_state) {
SAFE_FREE(es);
return NULL;
}
ZERO_STRUCTP(es->s.gss_state);
-#else
- DEBUG(0,("make_cli_enc_state: no krb5 compiled.\n"));
- SAFE_FREE(es);
- return NULL;
-#endif
}
+#endif
return es;
}
@@ -497,8 +493,7 @@ static NTSTATUS make_cli_gss_blob(struct smb_trans_enc_state *es,
memset(&tok_out, '\0', sizeof(tok_out));
/* Get a ticket for the service@host */
- asprintf(&host_princ_s, "%s@%s", service, host);
- if (host_princ_s == NULL) {
+ if (asprintf(&host_princ_s, "%s@%s", service, host) == -1) {
return NT_STATUS_NO_MEMORY;
}