summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-25 02:04:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:19 -0500
commitbc5b92c0e0a6bbfc09fa7594ce968996eafdbfbf (patch)
treec0be0a58a932fdb412af76caa4171f3193fc72fe /source4/libcli
parent5e34ee629a7beff84b39b0008a14ef59f271b224 (diff)
downloadsamba-bc5b92c0e0a6bbfc09fa7594ce968996eafdbfbf.tar.gz
samba-bc5b92c0e0a6bbfc09fa7594ce968996eafdbfbf.tar.bz2
samba-bc5b92c0e0a6bbfc09fa7594ce968996eafdbfbf.zip
r2036: switched the spnego code to use talloc
now that talloc_free() doesn't need to take a context ptr, there is no reason we can't use talloc everywhere that we currently use malloc(). (This used to be commit a2ad77fb3ac9638c5ef52494bf62083ec594b9f5)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/spnego_parse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index d32fd65c4d..41c9ece5fd 100644
--- a/source4/libcli/auth/spnego_parse.c
+++ b/source4/libcli/auth/spnego_parse.c
@@ -47,12 +47,12 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, struct spnego_negTokenInit *token
asn1_start_tag(asn1, ASN1_CONTEXT(0));
asn1_start_tag(asn1, ASN1_SEQUENCE(0));
- token->mechTypes = malloc(sizeof(*token->mechTypes));
+ token->mechTypes = talloc(NULL, sizeof(*token->mechTypes));
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes =
- realloc(token->mechTypes, (i + 2) *
- sizeof(*token->mechTypes));
+ talloc_realloc(token->mechTypes, (i + 2) *
+ sizeof(*token->mechTypes));
asn1_read_OID(asn1, token->mechTypes + i);
}
token->mechTypes[i] = NULL;
@@ -347,9 +347,9 @@ BOOL spnego_free_data(struct spnego_data *spnego)
if (spnego->negTokenInit.mechTypes) {
int i;
for (i = 0; spnego->negTokenInit.mechTypes[i]; i++) {
- free(spnego->negTokenInit.mechTypes[i]);
+ talloc_free(spnego->negTokenInit.mechTypes[i]);
}
- free(spnego->negTokenInit.mechTypes);
+ talloc_free(spnego->negTokenInit.mechTypes);
}
data_blob_free(&spnego->negTokenInit.mechToken);
data_blob_free(&spnego->negTokenInit.mechListMIC);