summaryrefslogtreecommitdiffstats
path: root/source4/libcli/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/clikrb5.c4
-rw-r--r--source4/libcli/auth/spnego_parse.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index 48e1f88503..7ad8dd7b6c 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -212,7 +212,7 @@
return -1;
}
- sa = malloc( sizeof(struct sockaddr) * num_kdcs );
+ sa = malloc_array_p(struct sockaddr, num_kdcs);
if (!sa) {
DEBUG(0, ("krb5_locate_kdc: malloc failed\n"));
krb5_krbhst_free(ctx, hnd);
@@ -220,7 +220,7 @@
return -1;
}
- *addr_pp = malloc(sizeof(struct sockaddr) * num_kdcs);
+ *addr_pp = malloc_array_p(struct sockaddr, num_kdcs);
memset(*addr_pp, '\0', sizeof(struct sockaddr) * num_kdcs );
for (i = 0; i < num_kdcs && (rc = krb5_krbhst_next(ctx, hnd, &hinfo) == 0); i++) {
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index 825b0a78d2..2cf38728a9 100644
--- a/source4/libcli/auth/spnego_parse.c
+++ b/source4/libcli/auth/spnego_parse.c
@@ -49,7 +49,7 @@ static BOOL read_negTokenInit(struct asn1_data *asn1, struct spnego_negTokenInit
asn1_start_tag(asn1, ASN1_CONTEXT(0));
asn1_start_tag(asn1, ASN1_SEQUENCE(0));
- token->mechTypes = talloc(NULL, sizeof(*token->mechTypes));
+ token->mechTypes = talloc_p(NULL, const char *);
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes =