summaryrefslogtreecommitdiffstats
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-03 07:20:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:20 -0500
commit6e6374cb5bcffb4df8bdb0a83327fff92b61ac84 (patch)
treefa45bc8c1a7281492f39069e5edd86da6d0c5d4e /source4/libcli/auth
parente5ce904ddbd6175ba86ed827bf096b76b11b5511 (diff)
downloadsamba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.gz
samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.tar.xz
samba-6e6374cb5bcffb4df8bdb0a83327fff92b61ac84.zip
r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f67365f27b4b7569fa982e22472aca1)
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 =