summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/lsa.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-28 06:44:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:25 -0500
commit318682b00377605a26d0b7fd4b59713c6c429b81 (patch)
tree5ad527e7dc49b4711e4a4a7aa0ee007d2eaf18ed /source4/torture/rpc/lsa.c
parent2550f5ae126bf33148dabf30ae97b6d6d82e30a0 (diff)
downloadsamba-318682b00377605a26d0b7fd4b59713c6c429b81.tar.gz
samba-318682b00377605a26d0b7fd4b59713c6c429b81.tar.bz2
samba-318682b00377605a26d0b7fd4b59713c6c429b81.zip
r18971: avoid strndup is a few places. Fixes a minor memory leak, and should
fix RPC-LSA on AIX. (This used to be commit 6cce709d08579f4e00b44b692332a557b0ea3b86)
Diffstat (limited to 'source4/torture/rpc/lsa.c')
-rw-r--r--source4/torture/rpc/lsa.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 84bc90963d..575426a409 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -976,7 +976,8 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret2 = sess_decrypt_string(&blob1, &session_key);
+ secret2 = sess_decrypt_string(mem_ctx,
+ &blob1, &session_key);
if (strcmp(secret1, secret2) != 0) {
printf("Returned secret '%s' doesn't match '%s'\n",
@@ -1036,7 +1037,8 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret4 = sess_decrypt_string(&blob1, &session_key);
+ secret4 = sess_decrypt_string(mem_ctx,
+ &blob1, &session_key);
if (strcmp(secret3, secret4) != 0) {
printf("Returned NEW secret %s doesn't match %s\n", secret4, secret3);
@@ -1048,7 +1050,8 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret2 = sess_decrypt_string(&blob1, &session_key);
+ secret2 = sess_decrypt_string(mem_ctx,
+ &blob1, &session_key);
if (strcmp(secret1, secret2) != 0) {
printf("Returned OLD secret %s doesn't match %s\n", secret2, secret1);
@@ -1122,7 +1125,8 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret6 = sess_decrypt_string(&blob1, &session_key);
+ secret6 = sess_decrypt_string(mem_ctx,
+ &blob1, &session_key);
if (strcmp(secret3, secret4) != 0) {
printf("Returned NEW secret '%s' doesn't match '%s'\n", secret4, secret3);
@@ -1134,7 +1138,8 @@ static BOOL test_CreateSecret(struct dcerpc_pipe *p,
blob2 = data_blob_talloc(mem_ctx, NULL, blob1.length);
- secret6 = sess_decrypt_string(&blob1, &session_key);
+ secret6 = sess_decrypt_string(mem_ctx,
+ &blob1, &session_key);
if (strcmp(secret5, secret6) != 0) {
printf("Returned OLD secret %s doesn't match %s\n", secret5, secret6);