summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/aliases.c14
-rw-r--r--source4/torture/basic/delaywrite.c2
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/basic/scanner.c6
-rw-r--r--source4/torture/dcom/simple.c2
-rw-r--r--source4/torture/gentest.c4
-rw-r--r--source4/torture/ldap/basic.c2
-rw-r--r--source4/torture/local/binding_string.c2
-rw-r--r--source4/torture/nbench/nbio.c10
-rw-r--r--source4/torture/rap/rap.c12
-rw-r--r--source4/torture/raw/acls.c2
-rw-r--r--source4/torture/raw/chkpath.c2
-rw-r--r--source4/torture/raw/close.c2
-rw-r--r--source4/torture/raw/composite.c2
-rw-r--r--source4/torture/raw/context.c2
-rw-r--r--source4/torture/raw/eas.c4
-rw-r--r--source4/torture/raw/ioctl.c2
-rw-r--r--source4/torture/raw/lock.c2
-rw-r--r--source4/torture/raw/mkdir.c4
-rw-r--r--source4/torture/raw/mux.c2
-rw-r--r--source4/torture/raw/notify.c2
-rw-r--r--source4/torture/raw/open.c4
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/raw/qfileinfo.c2
-rw-r--r--source4/torture/raw/qfsinfo.c2
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/raw/rename.c2
-rw-r--r--source4/torture/raw/search.c10
-rw-r--r--source4/torture/raw/seek.c2
-rw-r--r--source4/torture/raw/setfileinfo.c2
-rw-r--r--source4/torture/raw/streams.c2
-rw-r--r--source4/torture/raw/unlink.c2
-rw-r--r--source4/torture/raw/write.c2
-rw-r--r--source4/torture/rpc/alter_context.c2
-rw-r--r--source4/torture/rpc/atsvc.c2
-rw-r--r--source4/torture/rpc/bind.c4
-rw-r--r--source4/torture/rpc/dcom.c2
-rw-r--r--source4/torture/rpc/dfs.c2
-rw-r--r--source4/torture/rpc/drsuapi.c2
-rw-r--r--source4/torture/rpc/dssetup.c2
-rw-r--r--source4/torture/rpc/epmapper.c8
-rw-r--r--source4/torture/rpc/eventlog.c2
-rw-r--r--source4/torture/rpc/lsa.c14
-rw-r--r--source4/torture/rpc/netlogon.c4
-rw-r--r--source4/torture/rpc/oxidresolve.c2
-rw-r--r--source4/torture/rpc/remact.c2
-rw-r--r--source4/torture/rpc/samlogon.c2
-rw-r--r--source4/torture/rpc/samr.c10
-rw-r--r--source4/torture/rpc/samsync.c18
-rw-r--r--source4/torture/rpc/spoolss.c2
-rw-r--r--source4/torture/rpc/srvsvc.c6
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/testjoin.c4
-rw-r--r--source4/torture/rpc/winreg.c14
-rw-r--r--source4/torture/rpc/wkssvc.c2
-rw-r--r--source4/torture/rpc/xplogin.c38
-rw-r--r--source4/torture/torture.c4
-rw-r--r--source4/torture/torture_util.c10
58 files changed, 138 insertions, 138 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 018bfd9f1a..edea3d963e 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -48,7 +48,7 @@ static void gen_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int lev
status = smb_raw_trans2(cli->tree, mem_ctx, t2);
if (!NT_STATUS_IS_OK(status)) continue;
- t2b = talloc_p(mem_ctx, struct trans2_blobs);
+ t2b = talloc(mem_ctx, struct trans2_blobs);
t2b->level = level;
t2b->params = t2->out.params;
t2b->data = t2->out.data;
@@ -75,7 +75,7 @@ static void gen_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int lev
d_printf("Found %d aliased levels\n", alias_count);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
/* look for qfsinfo aliases */
@@ -176,7 +176,7 @@ static void qpathinfo_aliases(struct smbcli_state *cli)
gen_aliases(cli, &t2, 0);
smbcli_unlink(cli->tree, fname);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
@@ -224,7 +224,7 @@ static void findfirst_aliases(struct smbcli_state *cli)
gen_aliases(cli, &t2, 6);
smbcli_unlink(cli->tree, fname);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
@@ -278,7 +278,7 @@ static void gen_set_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) continue;
- t2b = talloc_p(mem_ctx, struct trans2_blobs);
+ t2b = talloc(mem_ctx, struct trans2_blobs);
t2b->level = level;
t2b->params = t2->out.params;
t2b->data = t2->out.data;
@@ -290,7 +290,7 @@ static void gen_set_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int
}
d_printf("Found %d valid levels\n", count);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
@@ -375,7 +375,7 @@ static void setpathinfo_aliases(struct smbcli_state *cli)
if (NT_STATUS_IS_ERR(smbcli_unlink(cli->tree, fname))) {
printf("unlink: %s\n", smbcli_errstr(cli->tree));
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 51fe2814e2..27a7c92eed 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -467,6 +467,6 @@ BOOL torture_delay_write(void)
ret &= test_delayed_write_update2(cli, mem_ctx);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 898fc41b4e..2a302ae3f6 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -156,6 +156,6 @@ BOOL torture_disconnect(void)
smb_raw_exit(cli->session);
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 4a92b5f31a..b1bbdf1cd1 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -77,7 +77,7 @@ static NTSTATUS try_trans2(struct smbcli_state *cli,
*rparam_len = t2.out.params.length;
*rdata_len = t2.out.data.length;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -355,13 +355,13 @@ static NTSTATUS try_nttrans(struct smbcli_state *cli,
if (NT_STATUS_IS_ERR(status)) {
DEBUG(1,("Failed to send NT_TRANS\n"));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
*rparam_len = parms.out.params.length;
*rdata_len = parms.out.data.length;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
diff --git a/source4/torture/dcom/simple.c b/source4/torture/dcom/simple.c
index 102a3f0dab..4e9ae1be28 100644
--- a/source4/torture/dcom/simple.c
+++ b/source4/torture/dcom/simple.c
@@ -95,7 +95,7 @@ static BOOL test_readwrite(TALLOC_CTX *mem_ctx, const char *host)
return False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 46514a6a43..87d49c6ce5 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -1393,7 +1393,7 @@ static BOOL handler_lockingx(int instance)
} while (nlocks == 0);
if (nlocks > 0) {
- parm[0].lockx.in.locks = talloc_array_p(current_op.mem_ctx,
+ parm[0].lockx.in.locks = talloc_array(current_op.mem_ctx,
struct smb_lock_entry,
nlocks);
for (n=0;n<nlocks;n++) {
@@ -1928,7 +1928,7 @@ static int run_test(void)
ret = gen_ops[which_op].handler(instance);
- talloc_destroy(current_op.mem_ctx);
+ talloc_free(current_op.mem_ctx);
gen_ops[which_op].count++;
if (NT_STATUS_IS_OK(current_op.status)) {
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index 8b1aca05f4..99f79c8c50 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -225,7 +225,7 @@ BOOL torture_ldap_basic(void)
/* no more test we are closing */
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_ldap_close(conn);
diff --git a/source4/torture/local/binding_string.c b/source4/torture/local/binding_string.c
index abf4555a22..66e8a5350f 100644
--- a/source4/torture/local/binding_string.c
+++ b/source4/torture/local/binding_string.c
@@ -125,7 +125,7 @@ BOOL torture_local_binding_string(void)
ret &= test_BindingString(mem_ctx, test_strings[i]);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index b83234be91..1864c82fdc 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -275,7 +275,7 @@ void nb_createx(const char *fname,
ret = smb_raw_open(c->tree, mem_ctx, &io);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
check_status("NTCreateX", status, ret);
@@ -527,7 +527,7 @@ void nb_qpathinfo(const char *fname, int level, NTSTATUS status)
ret = smb_raw_pathinfo(c->tree, mem_ctx, &io);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
check_status("Pathinfo", status, ret);
}
@@ -549,7 +549,7 @@ void nb_qfileinfo(int fnum, int level, NTSTATUS status)
ret = smb_raw_fileinfo(c->tree, mem_ctx, &io);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
check_status("Fileinfo", status, ret);
}
@@ -593,7 +593,7 @@ void nb_qfsinfo(int level, NTSTATUS status)
io.generic.level = level;
ret = smb_raw_fsinfo(c->tree, mem_ctx, &io);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
check_status("Fsinfo", status, ret);
}
@@ -621,7 +621,7 @@ void nb_findfirst(const char *mask, int level, int maxcnt, int count, NTSTATUS s
ret = smb_raw_search_first(c->tree, mem_ctx, &io, NULL, findfirst_callback);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
check_status("Search", status, ret);
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index b176de92c8..b68564aa2e 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -44,7 +44,7 @@ static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16 callno)
{
struct rap_call *call;
- call = talloc_p(mem_ctx, struct rap_call);
+ call = talloc(mem_ctx, struct rap_call);
if (call == NULL)
return NULL;
@@ -241,7 +241,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli,
NDR_OK(ndr_pull_uint16(call->ndr_pull_param, &r->out.count));
NDR_OK(ndr_pull_uint16(call->ndr_pull_param, &r->out.available));
- r->out.info = talloc_array_p(call, union rap_shareenum_info,
+ r->out.info = talloc_array(call, union rap_shareenum_info,
r->out.count);
if (r->out.info == NULL) {
@@ -272,7 +272,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_state *cli,
result = NT_STATUS_OK;
done:
- talloc_destroy(call);
+ talloc_free(call);
return result;
}
@@ -335,7 +335,7 @@ static NTSTATUS smbcli_rap_netserverenum2(struct smbcli_state *cli,
NDR_OK(ndr_pull_uint16(call->ndr_pull_param, &r->out.count));
NDR_OK(ndr_pull_uint16(call->ndr_pull_param, &r->out.available));
- r->out.info = talloc_array_p(call, union rap_server_info,
+ r->out.info = talloc_array(call, union rap_server_info,
r->out.count);
if (r->out.info == NULL) {
@@ -367,7 +367,7 @@ static NTSTATUS smbcli_rap_netserverenum2(struct smbcli_state *cli,
result = NT_STATUS_OK;
done:
- talloc_destroy(call);
+ talloc_free(call);
return result;
}
@@ -433,7 +433,7 @@ BOOL torture_raw_rap(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index cc99b40050..fd1ea0f340 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -1449,6 +1449,6 @@ BOOL torture_raw_acls(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index a59fa1af9b..191b3240d1 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -260,6 +260,6 @@ BOOL torture_raw_chkpath(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index f6884f37c9..5f2b7040d9 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -166,6 +166,6 @@ done:
smbcli_close(cli->tree, fnum);
smbcli_unlink(cli->tree, fname);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 38941b8c56..d32c9393c2 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -226,6 +226,6 @@ BOOL torture_raw_composite(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 5b6a2dd2ad..cdf8388e93 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -424,7 +424,7 @@ BOOL torture_raw_context(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 2361091a9b..a74237146f 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -76,7 +76,7 @@ static BOOL test_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
setfile.generic.level = RAW_SFILEINFO_EA_SET;
setfile.generic.file.fnum = fnum;
setfile.ea_set.in.num_eas = 2;
- setfile.ea_set.in.eas = talloc_array_p(mem_ctx, struct ea_struct, 2);
+ setfile.ea_set.in.eas = talloc_array(mem_ctx, struct ea_struct, 2);
setfile.ea_set.in.eas[0].flags = 0;
setfile.ea_set.in.eas[0].name.s = "EAONE";
setfile.ea_set.in.eas[0].value = data_blob_string_const("VALUE1");
@@ -244,6 +244,6 @@ BOOL torture_raw_eas(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index f050d220eb..70a0b2b528 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -158,6 +158,6 @@ BOOL torture_raw_ioctl(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 478c0a5a42..f2cd5b7cf7 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -675,6 +675,6 @@ BOOL torture_raw_lock(void)
ret &= test_changetype(cli, mem_ctx);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index eea5b20ffa..5cdc839194 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -108,7 +108,7 @@ static BOOL test_mkdir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
md.t2mkdir.level = RAW_MKDIR_T2MKDIR;
md.t2mkdir.in.path = path;
md.t2mkdir.in.num_eas = 3;
- md.t2mkdir.in.eas = talloc_array_p(mem_ctx, struct ea_struct, md.t2mkdir.in.num_eas);
+ md.t2mkdir.in.eas = talloc_array(mem_ctx, struct ea_struct, md.t2mkdir.in.num_eas);
md.t2mkdir.in.eas[0].flags = 0;
md.t2mkdir.in.eas[0].name.s = "EAONE";
md.t2mkdir.in.eas[0].value = data_blob_talloc(mem_ctx, "blah", 4);
@@ -158,6 +158,6 @@ BOOL torture_raw_mkdir(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c
index fce036a5e6..e8f7e4a712 100644
--- a/source4/torture/raw/mux.c
+++ b/source4/torture/raw/mux.c
@@ -335,6 +335,6 @@ BOOL torture_raw_mux(void)
smb_raw_exit(cli->session);
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 2a5a0ca074..0877931d06 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -133,6 +133,6 @@ done:
smb_raw_exit(cli->session);
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 3fa248e0a4..17a7f18505 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -506,7 +506,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.t2open.in.timeout = 0;
io.t2open.in.num_eas = 3;
- io.t2open.in.eas = talloc_array_p(mem_ctx, struct ea_struct, io.t2open.in.num_eas);
+ io.t2open.in.eas = talloc_array(mem_ctx, struct ea_struct, io.t2open.in.num_eas);
io.t2open.in.eas[0].flags = 0;
io.t2open.in.eas[0].name.s = ".CLASSINFO";
io.t2open.in.eas[0].value = data_blob_talloc(mem_ctx, "first value", 11);
@@ -1268,6 +1268,6 @@ BOOL torture_raw_open(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 9dcf6341c0..b167cb0903 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -345,6 +345,6 @@ BOOL torture_raw_oplock(void)
}
torture_close_connection(cli1);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index d398026a18..9a1a8a1144 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -711,6 +711,6 @@ done:
smbcli_unlink(cli->tree, fname);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index d302435a6c..258f127d61 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -292,6 +292,6 @@ BOOL torture_raw_qfsinfo(void)
done:
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index fb2e2ddec2..e8e305d01c 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -737,6 +737,6 @@ BOOL torture_raw_read(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 3d71790736..42f5903508 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -430,6 +430,6 @@ BOOL torture_raw_rename(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 84466d0cde..be54aecb3d 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -411,7 +411,7 @@ static BOOL multiple_search_callback(void *private, union smb_search_data *file)
data->count++;
- data->list = talloc_realloc_p(data->mem_ctx,
+ data->list = talloc_realloc(data->mem_ctx,
data->list,
union smb_search_data,
data->count);
@@ -1209,7 +1209,7 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
setfile.generic.level = RAW_SFILEINFO_EA_SET;
setfile.generic.file.fname = BASEDIR "\\file2.txt";
setfile.ea_set.in.num_eas = 2;
- setfile.ea_set.in.eas = talloc_array_p(mem_ctx, struct ea_struct, 2);
+ setfile.ea_set.in.eas = talloc_array(mem_ctx, struct ea_struct, 2);
setfile.ea_set.in.eas[0].flags = 0;
setfile.ea_set.in.eas[0].name.s = "EA ONE";
setfile.ea_set.in.eas[0].value = data_blob_string_const("VALUE 1");
@@ -1234,7 +1234,7 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.t2ffirst.in.storage_type = 0;
io.t2ffirst.in.pattern = BASEDIR "\\*";
io.t2ffirst.in.num_names = 2;
- io.t2ffirst.in.ea_names = talloc_array_p(mem_ctx, struct ea_name, 2);
+ io.t2ffirst.in.ea_names = talloc_array(mem_ctx, struct ea_name, 2);
io.t2ffirst.in.ea_names[0].name.s = "SECOND EA";
io.t2ffirst.in.ea_names[1].name.s = "THIRD EA";
@@ -1250,7 +1250,7 @@ static BOOL test_ea_list(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
nxt.t2fnext.in.flags = FLAG_TRANS2_FIND_REQUIRE_RESUME | FLAG_TRANS2_FIND_CONTINUE;
nxt.t2fnext.in.last_name = "file2.txt";
nxt.t2fnext.in.num_names = 2;
- nxt.t2fnext.in.ea_names = talloc_array_p(mem_ctx, struct ea_name, 2);
+ nxt.t2fnext.in.ea_names = talloc_array(mem_ctx, struct ea_name, 2);
nxt.t2fnext.in.ea_names[0].name.s = "SECOND EA";
nxt.t2fnext.in.ea_names[1].name.s = "THIRD EA";
@@ -1314,7 +1314,7 @@ BOOL torture_raw_search(void)
ret &= test_ea_list(cli, mem_ctx);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index 716a73b8f7..0d34c831a5 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -246,6 +246,6 @@ BOOL torture_raw_seek(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 53fbf5a0f3..cbfb6aa6a1 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -510,7 +510,7 @@ done:
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index dd03e1a125..54c83de896 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -233,6 +233,6 @@ BOOL torture_raw_streams(void)
smbcli_deltree(cli->tree, BASEDIR);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index d9c7ac6dfa..1c8c35d72f 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -183,6 +183,6 @@ BOOL torture_raw_unlink(void)
}
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 698520258d..7241f8c91a 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -690,6 +690,6 @@ BOOL torture_raw_write(void)
ret &= test_writex(cli, mem_ctx);
torture_close_connection(cli);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c
index 600b51d15b..79135ba018 100644
--- a/source4/torture/rpc/alter_context.c
+++ b/source4/torture/rpc/alter_context.c
@@ -97,7 +97,7 @@ BOOL torture_rpc_alter_context(void)
printf("testing DSSETUP pipe operations\n");
ret &= test_DsRoleGetPrimaryDomainInformation(p2, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 3d28fa775e..fd29a9228b 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -158,7 +158,7 @@ BOOL torture_rpc_atsvc(void)
return False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index fe0e29521a..d626536169 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -54,7 +54,7 @@ BOOL torture_multi_bind(void)
status = dcerpc_parse_binding(mem_ctx, binding_string, &b);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to parse dcerpc binding '%s'\n", binding_string));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return False;
}
@@ -97,7 +97,7 @@ BOOL torture_multi_bind(void)
printf("\n");
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c
index f44ce96658..f8bcf40965 100644
--- a/source4/torture/rpc/dcom.c
+++ b/source4/torture/rpc/dcom.c
@@ -42,7 +42,7 @@ BOOL torture_rpc_dcom(void)
printf("\n");
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index dd3227c2c1..358b94fa72 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -195,7 +195,7 @@ BOOL torture_rpc_dfs(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 4821d67d9c..f386c84a91 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -879,7 +879,7 @@ BOOL torture_rpc_drsuapi(void)
ret &= test_DsUnbind(p, mem_ctx, &priv);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/dssetup.c b/source4/torture/rpc/dssetup.c
index bafe562cdb..bd20a695e2 100644
--- a/source4/torture/rpc/dssetup.c
+++ b/source4/torture/rpc/dssetup.c
@@ -74,7 +74,7 @@ BOOL torture_rpc_dssetup(void)
ret &= test_DsRoleGetPrimaryDomainInformation(p, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 1f3c8968ca..4fcd0757f0 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -300,7 +300,7 @@ static BOOL test_Insert(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
r.in.num_ents = 1;
- r.in.entries = talloc_array_p(mem_ctx, struct epm_entry_t, 1);
+ r.in.entries = talloc_array(mem_ctx, struct epm_entry_t, 1);
ZERO_STRUCT(r.in.entries[0].object);
r.in.entries[0].annotation = "smbtorture endpoint";
status = dcerpc_parse_binding(mem_ctx, "ncalrpc:[SMBTORTURE]", &bd);
@@ -309,7 +309,7 @@ static BOOL test_Insert(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return False;
}
- r.in.entries[0].tower = talloc_p(mem_ctx, struct epm_twr_t);
+ r.in.entries[0].tower = talloc(mem_ctx, struct epm_twr_t);
status = dcerpc_binding_build_tower(mem_ctx, &bd, &r.in.entries[0].tower->tower);
if (NT_STATUS_IS_ERR(status)) {
@@ -343,7 +343,7 @@ static BOOL test_InqObject(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct epm_InqObject r;
- r.in.epm_object = talloc_p(mem_ctx, struct GUID);
+ r.in.epm_object = talloc(mem_ctx, struct GUID);
GUID_from_string(DCERPC_EPMAPPER_UUID, r.in.epm_object);
status = dcerpc_epm_InqObject(p, mem_ctx, &r);
@@ -384,7 +384,7 @@ BOOL torture_rpc_epmapper(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 91e012cdec..7e320200f0 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -173,7 +173,7 @@ BOOL torture_rpc_eventlog(void)
test_CloseEventLog(p, mem_ctx, &handle);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 2c802ea5de..089f58dc99 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -119,7 +119,7 @@ static BOOL test_LookupNames(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -161,7 +161,7 @@ static BOOL test_LookupNames2(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -206,7 +206,7 @@ static BOOL test_LookupNames3(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -380,7 +380,7 @@ static BOOL test_many_LookupSids(struct dcerpc_pipe *p,
sids.num_sids = 100;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr, sids.num_sids);
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr, sids.num_sids);
for (i=0; i<sids.num_sids; i++) {
const char *sidstr = "S-1-5-32-545";
@@ -472,7 +472,7 @@ static BOOL test_RemovePrivilegesFromAccount(struct dcerpc_pipe *p,
privs.count = 1;
privs.unknown = 0;
- privs.set = talloc_array_p(mem_ctx, struct lsa_LUIDAttribute, 1);
+ privs.set = talloc_array(mem_ctx, struct lsa_LUIDAttribute, 1);
privs.set[0].luid = *luid;
privs.set[0].attribute = 0;
@@ -502,7 +502,7 @@ static BOOL test_AddPrivilegesToAccount(struct dcerpc_pipe *p,
privs.count = 1;
privs.unknown = 0;
- privs.set = talloc_array_p(mem_ctx, struct lsa_LUIDAttribute, 1);
+ privs.set = talloc_array(mem_ctx, struct lsa_LUIDAttribute, 1);
privs.set[0].luid = *luid;
privs.set[0].attribute = 0;
@@ -1674,7 +1674,7 @@ BOOL torture_rpc_lsa(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 3da539aea5..0d7acd2875 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1149,7 +1149,7 @@ static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
struct creds_CredentialState creds_async[ASYNC_COUNT];
struct rpc_request *req[ASYNC_COUNT];
int i;
- int *async_counter = talloc_p(mem_ctx, int);
+ int *async_counter = talloc(mem_ctx, int);
if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("test_GetDomainInfo_async disabled - enable dangerous tests to use\n");
@@ -1362,7 +1362,7 @@ BOOL torture_rpc_netlogon(void)
ret &= test_GetDomainInfo_async(p, mem_ctx);
ret &= test_netr_DrsGetDCNameEx2(p, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 1849302929..b565d5de76 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -261,7 +261,7 @@ BOOL torture_rpc_oxidresolve(void)
if(!test_ResolveOxid2(p, mem_ctx, oxid))
ret = False;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index 897dd78255..aaef981fdb 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -117,7 +117,7 @@ BOOL torture_rpc_remact(void)
if(!test_RemoteActivation(p, mem_ctx))
ret = False;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index afb30b1987..1c7e3e0350 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1297,7 +1297,7 @@ BOOL torture_rpc_samlogon(void)
}
failed:
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 5d20587d26..fa64b556ef 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -629,7 +629,7 @@ static BOOL test_SetAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.alias_handle = handle;
r.in.level = levels[i];
- r.in.info = talloc_p(mem_ctx, union samr_AliasInfo);
+ r.in.info = talloc(mem_ctx, union samr_AliasInfo);
switch (r.in.level) {
case 2 : init_samr_String(&r.in.info->name,TEST_ALIASNAME); break;
case 3 : init_samr_String(&r.in.info->description,
@@ -1201,7 +1201,7 @@ static BOOL test_AddMultipleMembersToAlias(struct dcerpc_pipe *p, TALLOC_CTX *me
a.in.sids = &sids;
sids.num_sids = 3;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr, 3);
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr, 3);
sids.sids[0].sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32-1-2-3-1");
sids.sids[1].sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32-1-2-3-2");
@@ -2137,7 +2137,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing LookupNames\n");
n.in.domain_handle = handle;
n.in.num_names = r.out.sam->count;
- n.in.names = talloc_array_p(mem_ctx, struct samr_String, r.out.sam->count);
+ n.in.names = talloc_array(mem_ctx, struct samr_String, r.out.sam->count);
for (i=0;i<r.out.sam->count;i++) {
n.in.names[i] = r.out.sam->entries[i].name;
}
@@ -2151,7 +2151,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing LookupRids\n");
lr.in.domain_handle = handle;
lr.in.num_rids = r.out.sam->count;
- lr.in.rids = talloc_array_p(mem_ctx, uint32_t, r.out.sam->count);
+ lr.in.rids = talloc_array(mem_ctx, uint32_t, r.out.sam->count);
for (i=0;i<r.out.sam->count;i++) {
lr.in.rids[i] = r.out.sam->entries[i].idx;
}
@@ -3199,7 +3199,7 @@ BOOL torture_rpc_samr(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 2efb16222b..f7800e28cc 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -138,7 +138,7 @@ static struct policy_handle *samsync_open_domain(TALLOC_CTX *mem_ctx,
struct samr_String name;
struct samr_OpenDomain o;
struct samr_LookupDomain l;
- struct policy_handle *domain_handle = talloc_p(mem_ctx, struct policy_handle);
+ struct policy_handle *domain_handle = talloc(mem_ctx, struct policy_handle);
NTSTATUS nt_status;
name.string = domain;
@@ -705,8 +705,8 @@ static BOOL samsync_handle_secret(TALLOC_CTX *mem_ctx, struct samsync_state *sam
{
struct netr_DELTA_SECRET *secret = delta->delta_union.secret;
const char *name = delta->delta_id_union.name;
- struct samsync_secret *new = talloc_p(samsync_state, struct samsync_secret);
- struct samsync_secret *old = talloc_p(mem_ctx, struct samsync_secret);
+ struct samsync_secret *new = talloc(samsync_state, struct samsync_secret);
+ struct samsync_secret *old = talloc(mem_ctx, struct samsync_secret);
struct lsa_QuerySecret q;
struct lsa_OpenSecret o;
struct policy_handle sec_handle;
@@ -868,7 +868,7 @@ static BOOL samsync_handle_trusted_domain(TALLOC_CTX *mem_ctx, struct samsync_st
struct netr_DELTA_TRUSTED_DOMAIN *trusted_domain = delta->delta_union.trusted_domain;
struct dom_sid *dom_sid = delta->delta_id_union.sid;
- struct samsync_trusted_domain *new = talloc_p(samsync_state, struct samsync_trusted_domain);
+ struct samsync_trusted_domain *new = talloc(samsync_state, struct samsync_trusted_domain);
struct lsa_OpenTrustedDomain t;
struct policy_handle trustdom_handle;
struct lsa_QueryTrustedDomainInfo q;
@@ -1311,11 +1311,11 @@ BOOL torture_rpc_samsync(void)
return False;
}
- samsync_state = talloc_zero_p(mem_ctx, struct samsync_state);
+ samsync_state = talloc_zero(mem_ctx, struct samsync_state);
samsync_state->p_samr = torture_join_samr_pipe(join_ctx);
- samsync_state->connect_handle = talloc_zero_p(samsync_state, struct policy_handle);
- samsync_state->lsa_handle = talloc_zero_p(samsync_state, struct policy_handle);
+ samsync_state->connect_handle = talloc_zero(samsync_state, struct policy_handle);
+ samsync_state->lsa_handle = talloc_zero(samsync_state, struct policy_handle);
c.in.system_name = NULL;
c.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
c.out.connect_handle = samsync_state->connect_handle;
@@ -1336,7 +1336,7 @@ BOOL torture_rpc_samsync(void)
s.in.domain_handle = domain_policy;
s.in.level = 4;
- s.in.info = talloc_p(mem_ctx, union samr_DomainInfo);
+ s.in.info = talloc(mem_ctx, union samr_DomainInfo);
s.in.info->info4.comment.string
= talloc_asprintf(mem_ctx,
@@ -1469,7 +1469,7 @@ failed:
torture_leave_domain(join_ctx);
torture_leave_domain(join_ctx2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6f2edf9f47..c11a004e33 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1054,7 +1054,7 @@ BOOL torture_rpc_spoolss(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 4cc7dc6291..4b1305b7b6 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -204,11 +204,11 @@ static BOOL test_NetCharDevQSetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.level, devicequeue);
switch (r.in.level) {
case 0:
- r.in.info.info0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQInfo0);
+ r.in.info.info0 = talloc(mem_ctx, struct srvsvc_NetCharDevQInfo0);
r.in.info.info0->device = r.in.queue_name;
break;
case 1:
- r.in.info.info1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQInfo1);
+ r.in.info.info1 = talloc(mem_ctx, struct srvsvc_NetCharDevQInfo1);
r.in.info.info1->device = r.in.queue_name;
r.in.info.info1->priority = 0x000;
r.in.info.info1->devices = r.in.queue_name;
@@ -772,7 +772,7 @@ BOOL torture_rpc_srvsvc(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 256f92b974..cadc80a417 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -137,7 +137,7 @@ BOOL torture_rpc_svcctl(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index d034446adb..626bb666c1 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -107,7 +107,7 @@ struct test_join *torture_join_domain(const char *machine_name,
int policy_min_pw_len = 0;
struct test_join *join;
- join = talloc_p(NULL, struct test_join);
+ join = talloc(NULL, struct test_join);
if (join == NULL) {
return NULL;
}
@@ -287,7 +287,7 @@ struct test_join_ads_dc *torture_join_domain_ads_dc(const char *machine_name,
{
struct test_join_ads_dc *join;
- join = talloc_p(NULL, struct test_join_ads_dc);
+ join = talloc(NULL, struct test_join_ads_dc);
if (join == NULL) {
return NULL;
}
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 9e24a9f055..f2d79fffa0 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -136,7 +136,7 @@ static BOOL test_GetKeySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(r);
r.in.handle = handle;
- r.in.data = r.out.data = talloc_zero_p(mem_ctx, struct KeySecurityData);
+ r.in.data = r.out.data = talloc_zero(mem_ctx, struct KeySecurityData);
r.in.data->size = 0xffff;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -357,15 +357,15 @@ static BOOL test_QueryMultipleValues(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing QueryMultipleValues\n");
r.in.key_handle = handle;
- r.in.values = r.out.values = talloc_array_p(mem_ctx, struct QueryMultipleValue, 1);
- r.in.values[0].name = talloc_p(mem_ctx, struct winreg_String);
+ r.in.values = r.out.values = talloc_array(mem_ctx, struct QueryMultipleValue, 1);
+ r.in.values[0].name = talloc(mem_ctx, struct winreg_String);
r.in.values[0].name->name = valuename;
r.in.values[0].offset = 0;
r.in.values[0].length = 0;
r.in.values[0].type = 0;
r.in.num_values = 1;
- r.in.buffer_size = r.out.buffer_size = talloc_p(mem_ctx, uint32);
+ r.in.buffer_size = r.out.buffer_size = talloc(mem_ctx, uint32);
*r.in.buffer_size = 0x20;
r.in.buffer = r.out.buffer = talloc_zero_array(mem_ctx, uint8, *r.in.buffer_size);
@@ -557,7 +557,7 @@ static BOOL test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_c
NTSTATUS status;
r.in.hostname = NULL;
- r.in.message = talloc_p(mem_ctx, struct winreg_String);
+ r.in.message = talloc(mem_ctx, struct winreg_String);
init_winreg_String(r.in.message, msg);
r.in.force_apps = 1;
r.in.timeout = timeout;
@@ -585,7 +585,7 @@ static BOOL test_InitiateSystemShutdownEx(struct dcerpc_pipe *p, TALLOC_CTX *mem
NTSTATUS status;
r.in.hostname = NULL;
- r.in.message = talloc_p(mem_ctx, struct winreg_String);
+ r.in.message = talloc(mem_ctx, struct winreg_String);
init_winreg_String(r.in.message, msg);
r.in.force_apps = 1;
r.in.timeout = timeout;
@@ -784,7 +784,7 @@ BOOL torture_rpc_winreg(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index baa1f6bfd8..f3a3ec233c 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -109,7 +109,7 @@ BOOL torture_rpc_wkssvc(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c
index 3c4a881d96..8915417995 100644
--- a/source4/torture/rpc/xplogin.c
+++ b/source4/torture/rpc/xplogin.c
@@ -279,7 +279,7 @@ static NTSTATUS test_enumtrusts(struct smbcli_transport *transport)
DCERPC_LSARPC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -326,7 +326,7 @@ static NTSTATUS test_enumtrusts(struct smbcli_transport *transport)
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -350,7 +350,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
DCERPC_LSARPC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -404,7 +404,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
!NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
printf("LookupNames failed - %s\n", nt_errstr(status));
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
}
@@ -425,7 +425,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -457,7 +457,7 @@ static NTSTATUS setup_netlogon_creds(struct smbcli_transport *transport,
DCERPC_NETLOGON_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -569,7 +569,7 @@ static NTSTATUS torture_samlogon(struct dcerpc_pipe *p,
&lmv2_response, &ntlmv2_response,
NULL, NULL)) {
data_blob_free(&names_blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
data_blob_free(&names_blob);
@@ -591,7 +591,7 @@ static NTSTATUS torture_samlogon(struct dcerpc_pipe *p,
log.out.return_authenticator = NULL;
status = dcerpc_netr_LogonSamLogon(p, mem_ctx, &log);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
data_blob_free(&lmv2_response);
data_blob_free(&ntlmv2_response);
return status;
@@ -616,7 +616,7 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
DCERPC_SAMR_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -720,14 +720,14 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
l.in.domain_handle = &domain_handle;
l.in.num_rids = g.out.rids->count;
- l.in.rids = talloc_array_p(mem_ctx, uint32_t, g.out.rids->count);
+ l.in.rids = talloc_array(mem_ctx, uint32_t, g.out.rids->count);
for (i=0; i<g.out.rids->count; i++)
l.in.rids[i] = g.out.rids->rid[i].rid;
status = dcerpc_samr_LookupRids(p, mem_ctx, &l);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
}
@@ -749,7 +749,7 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
}
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -780,7 +780,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
DCERPC_SAMR_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -912,7 +912,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
ga.in.domain_handle = &builtin_handle;
sids.num_sids = g.out.rids->count+2;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr,
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr,
g.out.rids->count+2);
sids.sids[0].sid = user_sid;
sids.sids[1].sid = primary_group_sid;
@@ -958,7 +958,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
}
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -979,7 +979,7 @@ static NTSTATUS test_remoteTOD(struct smbcli_transport *transport)
DCERPC_SRVSVC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -993,7 +993,7 @@ static NTSTATUS test_remoteTOD(struct smbcli_transport *transport)
ZERO_STRUCT(r.out);
status = dcerpc_srvsvc_NetRemoteTOD(p, mem_ctx, &r);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
talloc_free(p);
return status;
}
@@ -1021,7 +1021,7 @@ static BOOL xp_login(const char *dcname, const char *wksname,
if (mem_ctx == NULL)
return False;
- netlogon_creds = talloc_p(mem_ctx, struct creds_CredentialState);
+ netlogon_creds = talloc(mem_ctx, struct creds_CredentialState);
if (!netlogon_creds) {
return False;
}
@@ -1112,7 +1112,7 @@ static BOOL xp_login(const char *dcname, const char *wksname,
talloc_free(transport);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return True;
}
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index e41e183537..2a0e344c09 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -174,7 +174,7 @@ NTSTATUS torture_rpc_connection_transport(struct dcerpc_pipe **p,
status = dcerpc_parse_binding(mem_ctx, binding, &b);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to parse dcerpc binding '%s'\n", binding));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -2598,7 +2598,7 @@ static BOOL is_binding_string(const char *binding_string)
status = dcerpc_parse_binding(mem_ctx, binding_string, &binding_struct);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_IS_OK(status);
}
diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c
index 3df1f3be41..c1e35cf3ef 100644
--- a/source4/torture/torture_util.c
+++ b/source4/torture/torture_util.c
@@ -65,11 +65,11 @@ int create_directory_handle(struct smbcli_tree *tree, const char *dname)
status = smb_raw_open(tree, mem_ctx, &io);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return -1;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return io.ntcreatex.out.fnum;
}
@@ -103,7 +103,7 @@ int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const cha
setfile.generic.level = RAW_SFILEINFO_EA_SET;
setfile.generic.file.fnum = fnum;
setfile.ea_set.in.num_eas = 2;
- setfile.ea_set.in.eas = talloc_array_p(mem_ctx, struct ea_struct, 2);
+ setfile.ea_set.in.eas = talloc_array(mem_ctx, struct ea_struct, 2);
setfile.ea_set.in.eas[0].flags = 0;
setfile.ea_set.in.eas[0].name.s = "EAONE";
setfile.ea_set.in.eas[0].value = data_blob_talloc(mem_ctx, "VALUE1", 6);
@@ -266,7 +266,7 @@ void torture_all_info(struct smbcli_tree *tree, const char *fname)
d_printf("%s:\n", fname);
dump_all_info(mem_ctx, &finfo);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
@@ -349,7 +349,7 @@ NTSTATUS torture_set_sparse(struct smbcli_tree *tree, int fnum)
status = smb_raw_ioctl(tree, mem_ctx, &nt);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}