summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-05-10 21:59:38 +0200
committerMichael Adam <obnox@samba.org>2011-05-10 21:59:38 +0200
commit75f289d30eea3005a7256ef9f5cab0e1e11b570b (patch)
tree3b21ebf6fbd11ab38e44e61d570f8c4f7fae828a /libcli
parent0791da4fdd75bca6cb4fae670fac4fc5527ab079 (diff)
downloadsamba-75f289d30eea3005a7256ef9f5cab0e1e11b570b.tar.gz
samba-75f289d30eea3005a7256ef9f5cab0e1e11b570b.tar.bz2
samba-75f289d30eea3005a7256ef9f5cab0e1e11b570b.zip
libcli/auth: fix "no talloc stackframe around" message from the samba4.blackbox.kinit test
create_kerberos_key_from_string_direct() used talloc_tos() directly. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/krb5_wrap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcli/auth/krb5_wrap.c b/libcli/auth/krb5_wrap.c
index 485a722d8c..d3392a3148 100644
--- a/libcli/auth/krb5_wrap.c
+++ b/libcli/auth/krb5_wrap.c
@@ -120,13 +120,15 @@ int create_kerberos_key_from_string_direct(krb5_context context,
krb5_error_code ret;
char *utf8_name;
size_t converted_size;
+ TALLOC_CTX *frame = talloc_stackframe();
- if (!push_utf8_talloc(talloc_tos(), &utf8_name, name, &converted_size)) {
+ if (!push_utf8_talloc(frame, &utf8_name, name, &converted_size)) {
+ talloc_free(frame);
return ENOMEM;
}
ret = krb5_parse_name(context, utf8_name, principal);
- TALLOC_FREE(utf8_name);
+ TALLOC_FREE(frame);
return ret;
}