summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/auth_builtin.c3
-rw-r--r--source4/libcli/auth/spnego_parse.c2
-rw-r--r--source4/libcli/util/asn1.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/source4/auth/auth_builtin.c b/source4/auth/auth_builtin.c
index 611552e903..c67b9b6835 100644
--- a/source4/auth/auth_builtin.c
+++ b/source4/auth/auth_builtin.c
@@ -44,7 +44,8 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
if (!(user_info->internal_username.str
&& *user_info->internal_username.str)) {
- nt_status = make_server_info_guest(auth_context, server_info);
+ nt_status = make_server_info_guest(discard_const(auth_context),
+ server_info);
}
return nt_status;
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index f9385ed96e..825b0a78d2 100644
--- a/source4/libcli/auth/spnego_parse.c
+++ b/source4/libcli/auth/spnego_parse.c
@@ -359,7 +359,7 @@ BOOL spnego_free_data(struct spnego_data *spnego)
break;
case SPNEGO_NEG_TOKEN_TARG:
if (spnego->negTokenTarg.supportedMech) {
- talloc_free(spnego->negTokenTarg.supportedMech);
+ talloc_free(discard_const(spnego->negTokenTarg.supportedMech));
}
data_blob_free(&spnego->negTokenTarg.responseToken);
data_blob_free(&spnego->negTokenTarg.mechListMIC);
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 15858f4f75..2bf29f9161 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -534,7 +534,7 @@ BOOL asn1_check_OID(struct asn1_data *data, const char *OID)
data->has_error = True;
return False;
}
- talloc_free(id);
+ talloc_free(discard_const(id));
return True;
}