summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-27 07:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:15 -0500
commit759da3b915e2006d4c87b5ace47f399accd9ce91 (patch)
tree6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a
parent1e42cacf6a8643bd633f631c212d71760852abbc (diff)
downloadsamba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.gz
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.bz2
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.zip
r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
-rw-r--r--source4/client/client.c18
-rw-r--r--source4/dsdb/samdb/samdb.c10
-rw-r--r--source4/gtk/common/gtk-smb.c2
-rw-r--r--source4/gtk/common/select.c6
-rw-r--r--source4/gtk/tools/gepdump.c6
-rw-r--r--source4/gtk/tools/gregedit.c2
-rw-r--r--source4/gtk/tools/gwcrontab.c12
-rw-r--r--source4/gtk/tools/gwsam.c12
-rw-r--r--source4/include/includes.h1
-rw-r--r--source4/intl/lang_tdb.c6
-rw-r--r--source4/ldap_server/ldap_backend.c2
-rw-r--r--source4/ldap_server/ldap_hacked_ldb.c30
-rw-r--r--source4/ldap_server/ldap_parse.c24
-rw-r--r--source4/ldap_server/ldap_rootdse.c14
-rw-r--r--source4/ldap_server/ldap_server.c16
-rw-r--r--source4/ldap_server/ldap_simple_ldb.c18
-rw-r--r--source4/lib/data_blob.c2
-rw-r--r--source4/lib/db_wrap.c4
-rw-r--r--source4/lib/dcom/common/main.c20
-rw-r--r--source4/lib/dcom/common/tables.c6
-rw-r--r--source4/lib/genrand.c2
-rw-r--r--source4/lib/idtree.c4
-rw-r--r--source4/lib/messaging/messaging.c8
-rw-r--r--source4/lib/ms_fnmatch.c2
-rw-r--r--source4/lib/netif/interface.c2
-rw-r--r--source4/lib/registry/common/reg_interface.c18
-rw-r--r--source4/lib/registry/common/reg_util.c6
-rw-r--r--source4/lib/registry/reg_backend_dir.c8
-rw-r--r--source4/lib/registry/reg_backend_gconf.c14
-rw-r--r--source4/lib/registry/reg_backend_ldb.c30
-rw-r--r--source4/lib/registry/reg_backend_nt4.c6
-rw-r--r--source4/lib/registry/reg_backend_rpc.c24
-rw-r--r--source4/lib/registry/reg_backend_w95.c12
-rw-r--r--source4/lib/registry/reg_samba.c4
-rw-r--r--source4/lib/registry/tools/regdiff.c8
-rw-r--r--source4/lib/registry/tools/regshell.c8
-rw-r--r--source4/lib/registry/tools/regtree.c4
-rw-r--r--source4/lib/socket/socket_ipv4.c2
-rw-r--r--source4/lib/socket/socket_ipv6.c2
-rw-r--r--source4/lib/socket/socket_unix.c2
-rw-r--r--source4/lib/unix_privs.c2
-rw-r--r--source4/lib/util_sock.c2
-rw-r--r--source4/lib/util_str.c2
-rw-r--r--source4/lib/util_unistr.c2
-rw-r--r--source4/libads/ldap.c28
-rw-r--r--source4/libads/ldap_printer.c2
-rw-r--r--source4/libads/ldap_user.c4
-rw-r--r--source4/libcli/auth/clikrb5.c2
-rw-r--r--source4/libcli/auth/gensec.c6
-rw-r--r--source4/libcli/auth/gensec_gssapi.c2
-rw-r--r--source4/libcli/auth/gensec_krb5.c2
-rw-r--r--source4/libcli/auth/gensec_ntlmssp.c2
-rw-r--r--source4/libcli/auth/ntlmssp.c4
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c4
-rw-r--r--source4/libcli/auth/schannel.c2
-rw-r--r--source4/libcli/auth/spnego.c4
-rw-r--r--source4/libcli/auth/spnego_parse.c2
-rw-r--r--source4/libcli/cliconnect.c2
-rw-r--r--source4/libcli/clifile.c8
-rw-r--r--source4/libcli/clilist.c10
-rw-r--r--source4/libcli/clitrans2.c14
-rw-r--r--source4/libcli/ldap/ldap.c14
-rw-r--r--source4/libcli/ldap/ldap_client.c6
-rw-r--r--source4/libcli/ldap/ldap_ldif.c8
-rw-r--r--source4/libcli/raw/rawacl.c2
-rw-r--r--source4/libcli/raw/raweas.c6
-rw-r--r--source4/libcli/raw/rawfile.c4
-rw-r--r--source4/libcli/raw/rawfileinfo.c10
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/libcli/raw/rawsetfileinfo.c8
-rw-r--r--source4/libcli/security/dom_sid.c12
-rw-r--r--source4/libcli/security/security_descriptor.c8
-rw-r--r--source4/libcli/security/security_token.c6
-rw-r--r--source4/libcli/util/asn1.c4
-rw-r--r--source4/libcli/util/clilsa.c4
-rw-r--r--source4/libcli/util/smbencrypt.c2
-rw-r--r--source4/libnet/libnet.c4
-rw-r--r--source4/libnet/libnet_join.c2
-rw-r--r--source4/libnet/libnet_passwd.c2
-rw-r--r--source4/librpc/ndr/ndr.c14
-rw-r--r--source4/librpc/ndr/ndr_dcom.c18
-rw-r--r--source4/librpc/rpc/dcerpc.c8
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c6
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c10
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c4
-rw-r--r--source4/librpc/rpc/dcerpc_util.c4
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c2
-rw-r--r--source4/ntvfs/common/brlock.c2
-rw-r--r--source4/ntvfs/common/opendb.c4
-rw-r--r--source4/ntvfs/common/sidmap.c2
-rw-r--r--source4/ntvfs/ipc/ipc_rap.c6
-rw-r--r--source4/ntvfs/ipc/rap_server.c2
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c2
-rw-r--r--source4/ntvfs/ntvfs_generic.c36
-rw-r--r--source4/ntvfs/ntvfs_util.c2
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c8
-rw-r--r--source4/ntvfs/posix/pvfs_dirlist.c2
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c2
-rw-r--r--source4/ntvfs/posix/pvfs_open.c14
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c8
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c10
-rw-r--r--source4/ntvfs/posix/pvfs_search.c6
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c4
-rw-r--r--source4/ntvfs/posix/pvfs_streams.c12
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c2
-rw-r--r--source4/ntvfs/posix/vfs_posix.c2
-rw-r--r--source4/ntvfs/posix/xattr_tdb.c4
-rw-r--r--source4/ntvfs/simple/svfs_util.c4
-rw-r--r--source4/ntvfs/simple/vfs_simple.c8
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c10
-rw-r--r--source4/param/loadparm.c2
-rw-r--r--source4/rpc_server/dcerpc_server.c12
-rw-r--r--source4/rpc_server/dcerpc_sock.c12
-rw-r--r--source4/rpc_server/dcesrv_auth.c4
-rw-r--r--source4/rpc_server/dcom/remact.c4
-rw-r--r--source4/rpc_server/dcom/rot.c14
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c4
-rw-r--r--source4/rpc_server/drsuapi/drsuapi_cracknames.c4
-rw-r--r--source4/rpc_server/dssetup/dcesrv_dssetup.c2
-rw-r--r--source4/rpc_server/echo/rpc_echo.c2
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c12
-rw-r--r--source4/rpc_server/handles.c2
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c68
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c14
-rw-r--r--source4/rpc_server/netlogon/schannel_state.c2
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c2
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c70
-rw-r--r--source4/rpc_server/samr/samr_password.c8
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c10
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c94
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c12
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c6
-rw-r--r--source4/smb_server/conn.c2
-rw-r--r--source4/smb_server/nttrans.c14
-rw-r--r--source4/smb_server/password.c4
-rw-r--r--source4/smb_server/request.c4
-rw-r--r--source4/smb_server/smb_server.c4
-rw-r--r--source4/smb_server/trans2.c14
-rw-r--r--source4/smbd/service.c6
-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
-rw-r--r--source4/utils/net/net.c4
-rw-r--r--source4/utils/ntlm_auth.c6
200 files changed, 751 insertions, 752 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index a3631fd710..5413beb3ba 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -1780,7 +1780,7 @@ static int cmd_allinfo(const char **cmd_ptr)
d_printf("\tcluster_shift %ld\n", (long)finfo.compression_info.out.cluster_shift);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
done:
return ret;
@@ -1816,7 +1816,7 @@ static int cmd_eainfo(const char **cmd_ptr)
if (!NT_STATUS_IS_OK(status)) {
d_printf("RAW_FILEINFO_ALL_EAS - %s\n", nt_errstr(status));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return 1;
}
@@ -1833,7 +1833,7 @@ static int cmd_eainfo(const char **cmd_ptr)
finfo.all_eas.out.eas[i].value.length);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
@@ -1888,7 +1888,7 @@ static int cmd_acl(const char **cmd_ptr)
NDR_PRINT_DEBUG(security_descriptor, query.query_secdesc.out.sd);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
done:
return ret;
@@ -2016,7 +2016,7 @@ static int cmd_addprivileges(const char **cmd_ptr)
ZERO_STRUCT(rights);
while (next_token(cmd_ptr,buf,NULL,sizeof(buf))) {
- rights.names = talloc_realloc_p(mem_ctx, rights.names,
+ rights.names = talloc_realloc(mem_ctx, rights.names,
struct lsa_String, rights.count+1);
rights.names[rights.count].string = talloc_strdup(mem_ctx, buf);
rights.count++;
@@ -2066,7 +2066,7 @@ static int cmd_delprivileges(const char **cmd_ptr)
ZERO_STRUCT(rights);
while (next_token(cmd_ptr,buf,NULL,sizeof(buf))) {
- rights.names = talloc_realloc_p(mem_ctx, rights.names,
+ rights.names = talloc_realloc(mem_ctx, rights.names,
struct lsa_String, rights.count+1);
rights.names[rights.count].string = talloc_strdup(mem_ctx, buf);
rights.count++;
@@ -2568,7 +2568,7 @@ static BOOL browse_host(const char *query_host)
if (!NT_STATUS_IS_OK(status)) {
d_printf("Failed to connect to %s - %s\n",
binding, nt_errstr(status));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return False;
}
talloc_steal(mem_ctx, p);
@@ -2595,7 +2595,7 @@ static BOOL browse_host(const char *query_host)
}
} while (NT_STATUS_IS_OK(status) && W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
d_printf("Failed NetShareEnumAll %s - %s/%s\n",
@@ -3283,7 +3283,7 @@ static void remember_query_host(const char *arg,
DEBUG( 3, ( "Client started (version %s).\n", SAMBA_VERSION_STRING ) );
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if ((p=strchr_m(query_host,'#'))) {
*p = 0;
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 4edc1a652a..a4f200c33f 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -258,7 +258,7 @@ int samdb_search_string_multiple(struct ldb_wrap *sam_ctx,
}
}
- *strs = talloc_array_p(mem_ctx, const char *, count+1);
+ *strs = talloc_array(mem_ctx, const char *, count+1);
if (! *strs) {
samdb_search_free(sam_ctx, mem_ctx, res);
return -1;
@@ -467,7 +467,7 @@ uint_t samdb_result_hashes(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
return 0;
}
- *hashes = talloc_array_p(mem_ctx, struct samr_Password, count);
+ *hashes = talloc_array(mem_ctx, struct samr_Password, count);
if (! *hashes) {
return 0;
}
@@ -488,7 +488,7 @@ NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
struct samr_Password *lmPwdHash, *ntPwdHash;
if (unicodePwd) {
if (nt_pwd) {
- ntPwdHash = talloc_p(mem_ctx, struct samr_Password);
+ ntPwdHash = talloc(mem_ctx, struct samr_Password);
if (!ntPwdHash) {
return NT_STATUS_NO_MEMORY;
}
@@ -500,7 +500,7 @@ NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
if (lm_pwd) {
BOOL lm_hash_ok;
- lmPwdHash = talloc_p(mem_ctx, struct samr_Password);
+ lmPwdHash = talloc(mem_ctx, struct samr_Password);
if (!lmPwdHash) {
return NT_STATUS_NO_MEMORY;
}
@@ -551,7 +551,7 @@ struct samr_LogonHours samdb_result_logon_hours(TALLOC_CTX *mem_ctx, struct ldb_
const int units_per_week = 168;
const struct ldb_val *val = ldb_msg_find_ldb_val(msg, attr);
ZERO_STRUCT(hours);
- hours.bits = talloc_array_p(mem_ctx, uint8, units_per_week);
+ hours.bits = talloc_array(mem_ctx, uint8, units_per_week);
if (!hours.bits) {
return hours;
}
diff --git a/source4/gtk/common/gtk-smb.c b/source4/gtk/common/gtk-smb.c
index 639aa68bac..f42516c854 100644
--- a/source4/gtk/common/gtk-smb.c
+++ b/source4/gtk/common/gtk-smb.c
@@ -319,7 +319,7 @@ const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d)
struct dcerpc_binding *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, TALLOC_CTX *mem_ctx)
{
- struct dcerpc_binding *binding = talloc_p(mem_ctx, struct dcerpc_binding);
+ struct dcerpc_binding *binding = talloc(mem_ctx, struct dcerpc_binding);
ZERO_STRUCT(binding->object);
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c
index 1409a625d0..082f449a0c 100644
--- a/source4/gtk/common/select.c
+++ b/source4/gtk/common/select.c
@@ -142,7 +142,7 @@ GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe)
status = dcerpc_samr_Connect(sam_pipe, mem_ctx, &cr);
if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, status);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return GTK_WIDGET(d);
}
@@ -168,11 +168,11 @@ GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe)
status = dcerpc_samr_Close(sam_pipe, mem_ctx, &dr);
if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(NULL, status);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return GTK_WIDGET ( d );
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return GTK_WIDGET ( d );
}
diff --git a/source4/gtk/tools/gepdump.c b/source4/gtk/tools/gepdump.c
index f6e39aacb2..4c8595f87c 100644
--- a/source4/gtk/tools/gepdump.c
+++ b/source4/gtk/tools/gepdump.c
@@ -118,7 +118,7 @@ static void refresh_eps(void)
struct policy_handle handle;
TALLOC_CTX *mem_ctx = talloc_init("dump");
- talloc_destroy(eps_ctx);
+ talloc_free(eps_ctx);
ZERO_STRUCT(handle);
@@ -152,10 +152,10 @@ static void refresh_eps(void)
if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
static void on_refresh_clicked (GtkButton *btn, gpointer user_data)
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c
index 6ca7fb653f..918ebd6945 100644
--- a/source4/gtk/tools/gregedit.c
+++ b/source4/gtk/tools/gregedit.c
@@ -990,7 +990,7 @@ static GtkWidget* create_savefilewin (void)
gtk_main ();
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return 0;
}
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index b41c0ffdcb..063469e334 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -70,7 +70,7 @@ void update_joblist(void)
-1);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
gtk_widget_set_sensitive(tasks, TRUE);
}
@@ -115,12 +115,12 @@ on_connect_activate (GtkMenuItem *menuitem,
gtk_show_ntstatus(mainwin, status);
at_pipe = NULL;
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
update_joblist();
}
@@ -164,12 +164,12 @@ on_new_activate (GtkMenuItem *menuitem,
status = dcerpc_atsvc_JobAdd(at_pipe, mem_ctx, &r);
if(!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
gtk_show_ntstatus(mainwin, status);
return;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
gtk_widget_destroy(d);
d = gtk_message_dialog_new (GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Job Id: %d", r.out.job_id);
@@ -200,7 +200,7 @@ on_delete_activate (GtkMenuItem *menuitem,
mem_ctx = talloc_init("del_job");
status = dcerpc_atsvc_JobDel(at_pipe, mem_ctx, &r);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
return;
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index d4da7a2fdf..7d9abde3d3 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -58,12 +58,12 @@ void update_userlist(void)
status = dcerpc_samr_EnumDomainUsers(sam_pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
gtk_show_ntstatus(mainwin, status);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
if (!r.out.sam || r.out.sam->count == 0) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
@@ -75,7 +75,7 @@ void update_userlist(void)
// ret = False;
// }
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
void
@@ -139,7 +139,7 @@ static void connect_sam(void)
gtk_show_ntstatus(mainwin, status);
sam_pipe = NULL;
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
@@ -152,7 +152,7 @@ static void connect_sam(void)
gtk_show_ntstatus(mainwin, status);
sam_pipe = NULL;
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return;
}
@@ -160,7 +160,7 @@ static void connect_sam(void)
gtk_widget_set_sensitive (mnu_disconnect, TRUE);
gtk_window_set_title (GTK_WINDOW (mainwin), talloc_asprintf(mem_ctx, "User Manager - Connected to %s", gtk_rpc_binding_dialog_get_host(d)));
gtk_widget_destroy(GTK_WIDGET(d));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 68e369a77b..70e06e2a58 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -110,7 +110,6 @@ extern int errno;
/* Lists, trees, caching, database... */
#include "xfile.h"
-#define TALLOC_DEPRECATED 1
#include "lib/talloc/talloc.h"
#include "nt_status.h"
#include "structs.h"
diff --git a/source4/intl/lang_tdb.c b/source4/intl/lang_tdb.c
index a70faa0d75..800bd547b5 100644
--- a/source4/intl/lang_tdb.c
+++ b/source4/intl/lang_tdb.c
@@ -133,7 +133,7 @@ BOOL lang_tdb_init(const char *lang)
if (stat(msg_path, &st) != 0) {
/* the msg file isn't available */
free(msg_path);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return False;
}
@@ -145,14 +145,14 @@ BOOL lang_tdb_init(const char *lang)
tdb = tdb_open(path, 0, TDB_DEFAULT, O_RDONLY, 0);
free(path);
free(msg_path);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!tdb) return False;
current_lang = strdup(lang);
return True;
}
free(path);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
loadtime = tdb_fetch_int32(tdb, "/LOADTIME/");
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 8a26c3fd8f..58c6dde436 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -27,7 +27,7 @@ struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, enum ldap_re
{
struct ldapsrv_reply *reply;
- reply = talloc_p(call, struct ldapsrv_reply);
+ reply = talloc(call, struct ldapsrv_reply);
if (!reply) {
return NULL;
}
diff --git a/source4/ldap_server/ldap_hacked_ldb.c b/source4/ldap_server/ldap_hacked_ldb.c
index 09c8f28277..4beb364c0e 100644
--- a/source4/ldap_server/ldap_hacked_ldb.c
+++ b/source4/ldap_server/ldap_hacked_ldb.c
@@ -322,7 +322,7 @@ static NTSTATUS hacked_Search(struct ldapsrv_partition *partition, struct ldapsr
}
if (r->num_attributes >= 1) {
- attrs = talloc_array_p(samdb, const char *, r->num_attributes+1);
+ attrs = talloc_array(samdb, const char *, r->num_attributes+1);
NT_STATUS_HAVE_NO_MEMORY(attrs);
for (j=0; j < r->num_attributes; j++) {
@@ -354,7 +354,7 @@ DEBUGADD(0,("hacked filter: %s\n", r->filter));
goto queue_reply;
}
ent->num_attributes = res[0]->num_elements;
- ent->attributes = talloc_array_p(ent_r, struct ldap_attribute, ent->num_attributes);
+ ent->attributes = talloc_array(ent_r, struct ldap_attribute, ent->num_attributes);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes);
for (j=0; j < ent->num_attributes; j++) {
ent->attributes[j].name = talloc_steal(ent->attributes, res[0]->elements[j].name);
@@ -362,7 +362,7 @@ DEBUGADD(0,("hacked filter: %s\n", r->filter));
ent->attributes[j].values = NULL;
ent->attributes[j].num_values = res[0]->elements[j].num_values;
if (ent->attributes[j].num_values == 1) {
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
status = convert_values(ent_r,
@@ -373,7 +373,7 @@ DEBUGADD(0,("hacked filter: %s\n", r->filter));
return status;
}
} else {
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
for (y=0; y < ent->attributes[j].num_values; y++) {
@@ -402,7 +402,7 @@ queue_reply:
goto queue_reply2;
}
ent->num_attributes = res[i]->num_elements;
- ent->attributes = talloc_array_p(ent_r, struct ldap_attribute, ent->num_attributes);
+ ent->attributes = talloc_array(ent_r, struct ldap_attribute, ent->num_attributes);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes);
for (j=0; j < ent->num_attributes; j++) {
ent->attributes[j].name = talloc_steal(ent->attributes, res[i]->elements[j].name);
@@ -412,7 +412,7 @@ queue_reply:
continue;
}
ent->attributes[j].num_values = res[i]->elements[j].num_values;
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
if (ent->attributes[j].num_values == 1) {
@@ -520,7 +520,7 @@ static NTSTATUS hldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
}
if (r->num_attributes >= 1) {
- attrs = talloc_array_p(samdb, const char *, r->num_attributes+1);
+ attrs = talloc_array(samdb, const char *, r->num_attributes+1);
NT_STATUS_HAVE_NO_MEMORY(attrs);
for (i=0; i < r->num_attributes; i++) {
@@ -552,7 +552,7 @@ static NTSTATUS hldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
goto queue_reply;
}
ent->num_attributes = res[i]->num_elements;
- ent->attributes = talloc_array_p(ent_r, struct ldap_attribute, ent->num_attributes);
+ ent->attributes = talloc_array(ent_r, struct ldap_attribute, ent->num_attributes);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes);
for (j=0; j < ent->num_attributes; j++) {
ent->attributes[j].name = talloc_steal(ent->attributes, res[i]->elements[j].name);
@@ -562,7 +562,7 @@ static NTSTATUS hldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
continue;
}
ent->attributes[j].num_values = res[i]->elements[j].num_values;
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
for (y=0; y < ent->attributes[j].num_values; y++) {
@@ -635,7 +635,7 @@ static NTSTATUS hldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
DEBUG(10, ("hldb_add: dn: [%s]\n", dn->dn));
- msg = talloc_p(local_ctx, struct ldb_message);
+ msg = talloc(local_ctx, struct ldb_message);
NT_STATUS_HAVE_NO_MEMORY(msg);
msg->dn = dn->dn;
@@ -645,7 +645,7 @@ static NTSTATUS hldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
if (r->num_attributes > 0) {
msg->num_elements = r->num_attributes;
- msg->elements = talloc_array_p(msg, struct ldb_message_element, msg->num_elements);
+ msg->elements = talloc_array(msg, struct ldb_message_element, msg->num_elements);
NT_STATUS_HAVE_NO_MEMORY(msg->elements);
for (i=0; i < msg->num_elements; i++) {
@@ -656,7 +656,7 @@ static NTSTATUS hldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
if (r->attributes[i].num_values > 0) {
msg->elements[i].num_values = r->attributes[i].num_values;
- msg->elements[i].values = talloc_array_p(msg, struct ldb_val, msg->elements[i].num_values);
+ msg->elements[i].values = talloc_array(msg, struct ldb_val, msg->elements[i].num_values);
NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
@@ -787,7 +787,7 @@ static NTSTATUS hldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
DEBUG(10, ("hldb_modify: dn: [%s]\n", dn->dn));
- msg = talloc_p(local_ctx, struct ldb_message);
+ msg = talloc(local_ctx, struct ldb_message);
NT_STATUS_HAVE_NO_MEMORY(msg);
msg->dn = dn->dn;
@@ -797,7 +797,7 @@ static NTSTATUS hldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
if (r->num_mods > 0) {
msg->num_elements = r->num_mods;
- msg->elements = talloc_array_p(msg, struct ldb_message_element, r->num_mods);
+ msg->elements = talloc_array(msg, struct ldb_message_element, r->num_mods);
NT_STATUS_HAVE_NO_MEMORY(msg->elements);
for (i=0; i < msg->num_elements; i++) {
@@ -823,7 +823,7 @@ static NTSTATUS hldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
msg->elements[i].num_values = r->mods[i].attrib.num_values;
if (msg->elements[i].num_values > 0) {
- msg->elements[i].values = talloc_array_p(msg, struct ldb_val, msg->elements[i].num_values);
+ msg->elements[i].values = talloc_array(msg, struct ldb_val, msg->elements[i].num_values);
NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
diff --git a/source4/ldap_server/ldap_parse.c b/source4/ldap_server/ldap_parse.c
index 5db65ee99c..d411b26c1a 100644
--- a/source4/ldap_server/ldap_parse.c
+++ b/source4/ldap_server/ldap_parse.c
@@ -80,7 +80,7 @@ static void ldap_parse_attributetypedescription(struct ldap_schema *schema, DATA
{
char *desc;
- desc = talloc_array_p(schema, char, data->lenght + 1);
+ desc = talloc_array(schema, char, data->lenght + 1);
memcpy(desc, data->data, data->lenght);
desc[data->lenght] = '\0';
@@ -90,7 +90,7 @@ static void ldap_parse_objectclassdescription(struct ldap_schema *schema, DATA_B
{
char *desc;
- desc = talloc_array_p(schema, char, data->lenght + 1);
+ desc = talloc_array(schema, char, data->lenght + 1);
memcpy(desc, data->data, data->lenght);
desc[data->lenght] = '\0';
@@ -112,7 +112,7 @@ static struct ldap_schema *ldap_get_schema(void *mem_ctx, struct ldap_schema *sc
local_schema = schema;
if (local_schema == NULL) {
- local_schema = talloc_p(mem_ctx, struct ldap_schema);
+ local_schema = talloc(mem_ctx, struct ldap_schema);
ALLOC_CHECK(local_schema);
}
@@ -156,10 +156,10 @@ struct ldap_dn *ldap_parse_dn(void *mem_ctx, const char *orig_dn)
char *p, *start, *separator, *src, *dest, *dn_copy, *dn_end;
int i, size, orig_len;
- dn = talloc_p(mem_ctx, struct ldap_dn);
+ dn = talloc(mem_ctx, struct ldap_dn);
dn->comp_num = 0;
- dn->components = talloc_array_p(dn, struct dn_component *, 1);
- component = talloc_p(dn, struct dn_component);
+ dn->components = talloc_array(dn, struct dn_component *, 1);
+ component = talloc(dn, struct dn_component);
component->attr_num = 0;
orig_len = strlen(orig_dn);
@@ -171,8 +171,8 @@ struct ldap_dn *ldap_parse_dn(void *mem_ctx, const char *orig_dn)
dn_copy = p = talloc_strdup(mem_ctx, orig_dn);
dn_end = dn_copy + orig_len + 1;
do {
- component->attributes = talloc_array_p(component, struct dn_attribute *, 1);
- attribute = talloc_p(component, struct dn_attribute);
+ component->attributes = talloc_array(component, struct dn_attribute *, 1);
+ attribute = talloc(component, struct dn_attribute);
/* skip "spaces" */
while (*p == ' ' || *p == '\n') {
@@ -255,10 +255,10 @@ struct ldap_dn *ldap_parse_dn(void *mem_ctx, const char *orig_dn)
component->attr_num++;
if (*separator == '+') { /* expect other attributes in this component */
- component->attributes = talloc_realloc_p(component, component->attributes, struct dn_attribute *, component->attr_num + 1);
+ component->attributes = talloc_realloc(component, component->attributes, struct dn_attribute *, component->attr_num + 1);
/* allocate new attribute structure */
- attribute = talloc_p(component, struct dn_attribute);
+ attribute = talloc(component, struct dn_attribute);
/* skip spaces past the separator */
p = separator + strspn(p, " \n");
@@ -290,8 +290,8 @@ struct ldap_dn *ldap_parse_dn(void *mem_ctx, const char *orig_dn)
dn->comp_num++;
if (*separator == ',' || *separator == ';') {
- dn->components = talloc_realloc_p(dn, dn->components, struct dn_component *, dn->comp_num + 1);
- component = talloc_p(dn, struct dn_component);
+ dn->components = talloc_realloc(dn, dn->components, struct dn_component *, dn->comp_num + 1);
+ component = talloc(dn, struct dn_component);
component->attr_num = 0;
}
p = separator + 1;
diff --git a/source4/ldap_server/ldap_rootdse.c b/source4/ldap_server/ldap_rootdse.c
index e1f3618072..3ab1ef03af 100644
--- a/source4/ldap_server/ldap_rootdse.c
+++ b/source4/ldap_server/ldap_rootdse.c
@@ -84,7 +84,7 @@ static void *rootdse_db_connect(TALLOC_CTX *mem_ctx)
return talloc_reference(mem_ctx, ctx);
}
- ctx = talloc_p(mem_ctx, struct rootdse_db_context);
+ ctx = talloc(mem_ctx, struct rootdse_db_context);
if (ctx == NULL) {
errno = ENOMEM;
return NULL;
@@ -124,7 +124,7 @@ static NTSTATUS fill_dynamic_values(void *mem_ctx, struct ldap_attribute *attrs)
if (strcasecmp(attrs->name, "currentTime") == 0)
{
int num_currentTime = 1;
- DATA_BLOB *currentTime = talloc_array_p(mem_ctx, DATA_BLOB, num_currentTime);
+ DATA_BLOB *currentTime = talloc_array(mem_ctx, DATA_BLOB, num_currentTime);
char *str = ldap_timestring(mem_ctx, time(NULL));
NT_STATUS_HAVE_NO_MEMORY(str);
currentTime[0].data = (uint8_t *)str;
@@ -205,7 +205,7 @@ static NTSTATUS fill_dynamic_values(void *mem_ctx, struct ldap_attribute *attrs)
if (strcasecmp(attrs->name, "supportedLDAPVersion") == 0)
{
int num_supportedLDAPVersion = 1;
- DATA_BLOB *supportedLDAPVersion = talloc_array_p(mem_ctx, DATA_BLOB, num_supportedLDAPVersion);
+ DATA_BLOB *supportedLDAPVersion = talloc_array(mem_ctx, DATA_BLOB, num_supportedLDAPVersion);
supportedLDAPVersion[0] = ATTR_BLOB_CONST("3");
ATTR_SINGLE_NOVAL(mem_ctx, attrs, supportedLDAPVersion, num_supportedLDAPVersion, "supportedLDAPVersion");
return NT_STATUS_OK;
@@ -288,7 +288,7 @@ static NTSTATUS fill_dynamic_values(void *mem_ctx, struct ldap_attribute *attrs)
*/
{
- DATA_BLOB *x = talloc_array_p(mem_ctx, DATA_BLOB, 1);
+ DATA_BLOB *x = talloc_array(mem_ctx, DATA_BLOB, 1);
x[0] = ATTR_BLOB_CONST("0");
ATTR_SINGLE_NOVAL(mem_ctx, attrs, x, 1, attrs->name);
}
@@ -321,7 +321,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps
NT_STATUS_HAVE_NO_MEMORY(rootdsedb);
if (r->num_attributes >= 1) {
- attrs = talloc_array_p(rootdsedb, const char *, r->num_attributes+1);
+ attrs = talloc_array(rootdsedb, const char *, r->num_attributes+1);
NT_STATUS_HAVE_NO_MEMORY(attrs);
for (j=0; j < r->num_attributes; j++) {
@@ -346,7 +346,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps
goto queue_reply;
}
ent->num_attributes = res[0]->num_elements;
- ent->attributes = talloc_array_p(ent_r, struct ldap_attribute, ent->num_attributes);
+ ent->attributes = talloc_array(ent_r, struct ldap_attribute, ent->num_attributes);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes);
for (j=0; j < ent->num_attributes; j++) {
ent->attributes[j].name = talloc_steal(ent->attributes, res[0]->elements[j].name);
@@ -360,7 +360,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps
return status;
}
} else {
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
for (y=0; y < ent->attributes[j].num_values; y++) {
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 3c27577b66..d5b4aaae43 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -65,16 +65,16 @@ static void ldapsrv_init(struct server_service *service)
DEBUG(10,("ldapsrv_init\n"));
- ldap_service = talloc_p(service, struct ldapsrv_service);
+ ldap_service = talloc(service, struct ldapsrv_service);
if (!ldap_service) {
- DEBUG(0,("talloc_p(service, struct ldapsrv_service) failed\n"));
+ DEBUG(0,("talloc(service, struct ldapsrv_service) failed\n"));
return;
}
ZERO_STRUCTP(ldap_service);
- rootDSE_part = talloc_p(ldap_service, struct ldapsrv_partition);
+ rootDSE_part = talloc(ldap_service, struct ldapsrv_partition);
if (!rootDSE_part) {
- DEBUG(0,("talloc_p(ldap_service, struct ldapsrv_partition) failed\n"));
+ DEBUG(0,("talloc(ldap_service, struct ldapsrv_partition) failed\n"));
return;
}
rootDSE_part->base_dn = ""; /* RootDSE */
@@ -83,9 +83,9 @@ static void ldapsrv_init(struct server_service *service)
ldap_service->rootDSE = rootDSE_part;
DLIST_ADD_END(ldap_service->partitions, rootDSE_part, struct ldapsrv_partition *);
- part = talloc_p(ldap_service, struct ldapsrv_partition);
+ part = talloc(ldap_service, struct ldapsrv_partition);
if (!ldap_service) {
- DEBUG(0,("talloc_p(ldap_service, struct ldapsrv_partition) failed\n"));
+ DEBUG(0,("talloc(ldap_service, struct ldapsrv_partition) failed\n"));
return;
}
part->base_dn = "*"; /* default partition */
@@ -467,7 +467,7 @@ static void ldapsrv_recv(struct server_connection *conn, struct timeval t,
return;
}
- call = talloc_p(ldap_conn, struct ldapsrv_call);
+ call = talloc(ldap_conn, struct ldapsrv_call);
if (!call) {
ldapsrv_terminate_connection(ldap_conn, "no memory");
return;
@@ -546,7 +546,7 @@ static void ldapsrv_accept(struct server_connection *conn)
DEBUG(10, ("ldapsrv_accept\n"));
- ldap_conn = talloc_p(conn, struct ldapsrv_connection);
+ ldap_conn = talloc(conn, struct ldapsrv_connection);
if (ldap_conn == NULL)
return;
diff --git a/source4/ldap_server/ldap_simple_ldb.c b/source4/ldap_server/ldap_simple_ldb.c
index e16d187162..41431e091b 100644
--- a/source4/ldap_server/ldap_simple_ldb.c
+++ b/source4/ldap_server/ldap_simple_ldb.c
@@ -79,7 +79,7 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
}
if (r->num_attributes >= 1) {
- attrs = talloc_array_p(samdb, const char *, r->num_attributes+1);
+ attrs = talloc_array(samdb, const char *, r->num_attributes+1);
NT_STATUS_HAVE_NO_MEMORY(attrs);
for (i=0; i < r->num_attributes; i++) {
@@ -104,7 +104,7 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
goto queue_reply;
}
ent->num_attributes = res[i]->num_elements;
- ent->attributes = talloc_array_p(ent_r, struct ldap_attribute, ent->num_attributes);
+ ent->attributes = talloc_array(ent_r, struct ldap_attribute, ent->num_attributes);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes);
for (j=0; j < ent->num_attributes; j++) {
ent->attributes[j].name = talloc_steal(ent->attributes, res[i]->elements[j].name);
@@ -114,7 +114,7 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
continue;
}
ent->attributes[j].num_values = res[i]->elements[j].num_values;
- ent->attributes[j].values = talloc_array_p(ent->attributes,
+ ent->attributes[j].values = talloc_array(ent->attributes,
DATA_BLOB, ent->attributes[j].num_values);
NT_STATUS_HAVE_NO_MEMORY(ent->attributes[j].values);
for (y=0; y < ent->attributes[j].num_values; y++) {
@@ -186,7 +186,7 @@ static NTSTATUS sldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
DEBUG(10, ("sldb_add: dn: [%s]\n", dn->dn));
- msg = talloc_p(local_ctx, struct ldb_message);
+ msg = talloc(local_ctx, struct ldb_message);
NT_STATUS_HAVE_NO_MEMORY(msg);
msg->dn = dn->dn;
@@ -196,7 +196,7 @@ static NTSTATUS sldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
if (r->num_attributes > 0) {
msg->num_elements = r->num_attributes;
- msg->elements = talloc_array_p(msg, struct ldb_message_element, msg->num_elements);
+ msg->elements = talloc_array(msg, struct ldb_message_element, msg->num_elements);
NT_STATUS_HAVE_NO_MEMORY(msg->elements);
for (i=0; i < msg->num_elements; i++) {
@@ -207,7 +207,7 @@ static NTSTATUS sldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
if (r->attributes[i].num_values > 0) {
msg->elements[i].num_values = r->attributes[i].num_values;
- msg->elements[i].values = talloc_array_p(msg, struct ldb_val, msg->elements[i].num_values);
+ msg->elements[i].values = talloc_array(msg, struct ldb_val, msg->elements[i].num_values);
NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
@@ -337,7 +337,7 @@ static NTSTATUS sldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
DEBUG(10, ("sldb_modify: dn: [%s]\n", dn->dn));
- msg = talloc_p(local_ctx, struct ldb_message);
+ msg = talloc(local_ctx, struct ldb_message);
NT_STATUS_HAVE_NO_MEMORY(msg);
msg->dn = dn->dn;
@@ -347,7 +347,7 @@ static NTSTATUS sldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
if (r->num_mods > 0) {
msg->num_elements = r->num_mods;
- msg->elements = talloc_array_p(msg, struct ldb_message_element, r->num_mods);
+ msg->elements = talloc_array(msg, struct ldb_message_element, r->num_mods);
NT_STATUS_HAVE_NO_MEMORY(msg->elements);
for (i=0; i < msg->num_elements; i++) {
@@ -373,7 +373,7 @@ static NTSTATUS sldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
msg->elements[i].num_values = r->mods[i].attrib.num_values;
if (msg->elements[i].num_values > 0) {
- msg->elements[i].values = talloc_array_p(msg, struct ldb_val, msg->elements[i].num_values);
+ msg->elements[i].values = talloc_array(msg, struct ldb_val, msg->elements[i].num_values);
NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c
index deb8f55fce..284db4518f 100644
--- a/source4/lib/data_blob.c
+++ b/source4/lib/data_blob.c
@@ -150,7 +150,7 @@ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob)
int i;
char *hex_string;
- hex_string = talloc_array_p(mem_ctx, char, (blob->length*2)+1);
+ hex_string = talloc_array(mem_ctx, char, (blob->length*2)+1);
if (!hex_string) {
return NULL;
}
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c
index a9ca7e3e0a..854f772717 100644
--- a/source4/lib/db_wrap.c
+++ b/source4/lib/db_wrap.c
@@ -80,7 +80,7 @@ struct ldb_wrap *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
}
}
- w = talloc_p(mem_ctx, struct ldb_wrap);
+ w = talloc(mem_ctx, struct ldb_wrap);
if (w == NULL) {
return NULL;
}
@@ -151,7 +151,7 @@ struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
}
}
- w = talloc_p(mem_ctx, struct tdb_wrap);
+ w = talloc(mem_ctx, struct tdb_wrap);
if (w == NULL) {
return NULL;
}
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index 219c06a665..01906501f1 100644
--- a/source4/lib/dcom/common/main.c
+++ b/source4/lib/dcom/common/main.c
@@ -71,10 +71,10 @@ static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe *
DCERPC_IREMOTEACTIVATION_VERSION,
ctx->domain, ctx->user, ctx->password);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
ZERO_STRUCT(bd);
bd.host = server;
@@ -106,7 +106,7 @@ static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe *
WERROR dcom_init(struct dcom_context **ctx, const char *domain, const char *user, const char *pass)
{
- *ctx = talloc_p(NULL, struct dcom_context);
+ *ctx = talloc(NULL, struct dcom_context);
(*ctx)->oxids = NULL;
(*ctx)->domain = talloc_strdup(*ctx, domain);
(*ctx)->user = talloc_strdup(*ctx, user);
@@ -128,7 +128,7 @@ static struct dcom_object_exporter *oxid_mapping_by_oxid (struct dcom_context *c
/* Add oxid mapping if we couldn't find one */
if (!m) {
- m = talloc_zero_p(ctx, struct dcom_object_exporter);
+ m = talloc_zero(ctx, struct dcom_object_exporter);
m->oxid = oxid;
DLIST_ADD(ctx->oxids, m);
}
@@ -169,7 +169,7 @@ static WERROR dcom_create_object_remote(struct dcom_context *ctx, struct GUID *c
r.in.protseq = protseq;
r.in.Interfaces = num_ifaces;
r.in.pIIDs = iid;
- r.out.ifaces = talloc_array_p(ctx, struct pMInterfacePointer, num_ifaces);
+ r.out.ifaces = talloc_array(ctx, struct pMInterfacePointer, num_ifaces);
r.out.pdsaOxidBindings = &dualstring;
status = dcerpc_RemoteActivation(p, ctx, &r);
@@ -186,7 +186,7 @@ static WERROR dcom_create_object_remote(struct dcom_context *ctx, struct GUID *c
return r.out.hr;
}
- *ip = talloc_array_p(ctx, struct dcom_interface_p *, num_ifaces);
+ *ip = talloc_array(ctx, struct dcom_interface_p *, num_ifaces);
for (i = 0; i < num_ifaces; i++) {
results[i] = r.out.results[i];
(*ip)[i] = NULL;
@@ -419,7 +419,7 @@ struct dcom_object *dcom_object_by_oid(struct dcom_object_exporter *ox, uint64_t
}
if (o == NULL) {
- o = talloc_zero_p(ox, struct dcom_object);
+ o = talloc_zero(ox, struct dcom_object);
o->oid = oid;
DLIST_ADD(ox->objects, o);
}
@@ -435,7 +435,7 @@ NTSTATUS dcom_OBJREF_from_ifacep(struct dcom_context *ctx, struct OBJREF *o, str
NTSTATUS dcom_ifacep_from_OBJREF(struct dcom_context *ctx, struct dcom_interface_p **_p, struct OBJREF *o)
{
- struct dcom_interface_p *p = talloc_p(ctx, struct dcom_interface_p);
+ struct dcom_interface_p *p = talloc(ctx, struct dcom_interface_p);
p->ctx = ctx;
p->interface = dcom_interface_by_iid(&o->iid);
@@ -502,7 +502,7 @@ NTSTATUS dcom_ifacep_from_OBJREF(struct dcom_context *ctx, struct dcom_interface
DEBUG(3, ("No binding data present yet, resolving OXID %llu\n", p->ox->oxid));
- m = talloc_zero_p(p->ctx, struct dcom_oxid_mapping);
+ m = talloc_zero(p->ctx, struct dcom_oxid_mapping);
m->oxid = oxid;
i = 0;
@@ -551,7 +551,7 @@ uint64_t dcom_get_current_oxid(void)
struct dcom_interface_p *dcom_new_local_ifacep(struct dcom_context *ctx, const struct GUID *iid, void *vtable, struct dcom_object *object)
{
- struct dcom_interface_p *ip = talloc_p(ctx, struct dcom_interface_p);
+ struct dcom_interface_p *ip = talloc(ctx, struct dcom_interface_p);
const struct dcom_interface *iface = dcom_interface_by_iid(iid);
if (!iface) {
diff --git a/source4/lib/dcom/common/tables.c b/source4/lib/dcom/common/tables.c
index 8a764d0a65..cd7e0867ee 100644
--- a/source4/lib/dcom/common/tables.c
+++ b/source4/lib/dcom/common/tables.c
@@ -81,9 +81,9 @@ NTSTATUS dcom_register_interface(const void *_iface)
DEBUG(5, ("Adding DCOM interface %s\n", GUID_string(lcl_ctx, &iface->iid)));
- talloc_destroy(lcl_ctx);
+ talloc_free(lcl_ctx);
- l = talloc_zero_p(interfaces?interfaces:talloc_autofree_context(),
+ l = talloc_zero(interfaces?interfaces:talloc_autofree_context(),
struct interface_list);
l->interface = *iface;
@@ -96,7 +96,7 @@ NTSTATUS dcom_register_interface(const void *_iface)
NTSTATUS dcom_register_class(const void *_class)
{
const struct dcom_class *class = _class;
- struct class_list *l = talloc_zero_p(classes?classes:talloc_autofree_context(),
+ struct class_list *l = talloc_zero(classes?classes:talloc_autofree_context(),
struct class_list);
l->class = *class;
diff --git a/source4/lib/genrand.c b/source4/lib/genrand.c
index aab42864e0..0f1d02b710 100644
--- a/source4/lib/genrand.c
+++ b/source4/lib/genrand.c
@@ -278,7 +278,7 @@ char *generate_random_str_list(TALLOC_CTX *mem_ctx, size_t len, const char *list
size_t i;
size_t list_len = strlen(list);
- char *retstr = talloc_array_p(mem_ctx, char, len + 1);
+ char *retstr = talloc_array(mem_ctx, char, len + 1);
if (!retstr) return NULL;
generate_random_buffer((uint8_t *)retstr, len);
diff --git a/source4/lib/idtree.c b/source4/lib/idtree.c
index c4370a812d..82c1cdd42a 100644
--- a/source4/lib/idtree.c
+++ b/source4/lib/idtree.c
@@ -87,7 +87,7 @@ static void free_layer(struct idr_context *idp, struct idr_layer *p)
static int idr_pre_get(struct idr_context *idp)
{
while (idp->id_free_cnt < IDR_FREE_MAX) {
- struct idr_layer *new = talloc_zero_p(idp, struct idr_layer);
+ struct idr_layer *new = talloc_zero(idp, struct idr_layer);
if(new == NULL)
return (0);
free_layer(idp, new);
@@ -313,7 +313,7 @@ static int _idr_remove(struct idr_context *idp, int id)
*/
struct idr_context *idr_init(TALLOC_CTX *mem_ctx)
{
- return talloc_zero_p(mem_ctx, struct idr_context);
+ return talloc_zero(mem_ctx, struct idr_context);
}
/*
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index ca7682f5d2..e2e8161111 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -199,7 +199,7 @@ static void messaging_listen_handler(struct event_context *ev, struct fd_event *
NTSTATUS status;
struct fd_event fde2;
- rec = talloc_p(msg, struct messaging_rec);
+ rec = talloc(msg, struct messaging_rec);
if (rec == NULL) {
smb_panic("Unable to allocate messaging_rec");
}
@@ -232,7 +232,7 @@ void messaging_register(struct messaging_context *msg, void *private,
{
struct dispatch_fn *d;
- d = talloc_p(msg, struct dispatch_fn);
+ d = talloc(msg, struct dispatch_fn);
d->msg_type = msg_type;
d->private = private;
d->fn = fn;
@@ -371,7 +371,7 @@ NTSTATUS messaging_send(struct messaging_context *msg, servid_t server, uint32_t
NTSTATUS status;
struct fd_event fde;
- rec = talloc_p(msg, struct messaging_rec);
+ rec = talloc(msg, struct messaging_rec);
if (rec == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -460,7 +460,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, servid_t server_id
NTSTATUS status;
struct fd_event fde;
- msg = talloc_p(mem_ctx, struct messaging_context);
+ msg = talloc(mem_ctx, struct messaging_context);
if (msg == NULL) {
return NULL;
}
diff --git a/source4/lib/ms_fnmatch.c b/source4/lib/ms_fnmatch.c
index 386dac4ea3..c405d2ff30 100644
--- a/source4/lib/ms_fnmatch.c
+++ b/source4/lib/ms_fnmatch.c
@@ -198,7 +198,7 @@ int ms_fnmatch(const char *pattern, const char *string, enum protocol_types prot
if (pattern[i] == '*' || pattern[i] == '<') count++;
}
- max_n = talloc_array_p(NULL, struct max_n, count);
+ max_n = talloc_array(NULL, struct max_n, count);
if (!max_n) {
return -1;
}
diff --git a/source4/lib/netif/interface.c b/source4/lib/netif/interface.c
index c73a2e3d7b..9075d4f3ac 100644
--- a/source4/lib/netif/interface.c
+++ b/source4/lib/netif/interface.c
@@ -241,7 +241,7 @@ void load_interfaces(void)
}
exit:
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 442b34bc13..8385cef108 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -44,7 +44,7 @@ NTSTATUS registry_register(const void *_hive_ops)
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- entry = talloc_p(talloc_autofree_context(), struct reg_init_function_entry);
+ entry = talloc(talloc_autofree_context(), struct reg_init_function_entry);
entry->hive_functions = hive_ops;
DLIST_ADD(backends, entry);
@@ -93,8 +93,8 @@ static struct {
int reg_list_predefs(TALLOC_CTX *mem_ctx, char ***predefs, uint32_t **hkeys)
{
int i;
- *predefs = talloc_array_p(mem_ctx, char *, ARRAY_SIZE(predef_names));
- *hkeys = talloc_array_p(mem_ctx, uint32_t, ARRAY_SIZE(predef_names));
+ *predefs = talloc_array(mem_ctx, char *, ARRAY_SIZE(predef_names));
+ *hkeys = talloc_array(mem_ctx, uint32_t, ARRAY_SIZE(predef_names));
for (i = 0; predef_names[i].name; i++) {
(*predefs)[i] = talloc_strdup(mem_ctx, predef_names[i].name);
@@ -129,7 +129,7 @@ WERROR reg_get_predefined_key_by_name(struct registry_context *ctx, const char *
WERROR reg_close (struct registry_context *ctx)
{
- talloc_destroy(ctx);
+ talloc_free(ctx);
return WERR_OK;
}
@@ -165,7 +165,7 @@ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, const char *lo
return WERR_NOT_SUPPORTED;
}
- rethive = talloc_p(parent_ctx, struct registry_hive);
+ rethive = talloc(parent_ctx, struct registry_hive);
rethive->location = location?talloc_strdup(rethive, location):NULL;
rethive->functions = entry->hive_functions;
rethive->backend_data = NULL;
@@ -277,7 +277,7 @@ WERROR reg_key_num_subkeys(struct registry_key *key, int *count)
TALLOC_CTX *mem_ctx = talloc_init("num_subkeys");
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, key, i, &dest)); i++);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*count = i;
if(W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) error = WERR_OK;
@@ -303,7 +303,7 @@ WERROR reg_key_num_values(struct registry_key *key, int *count)
TALLOC_CTX *mem_ctx = talloc_init("num_subkeys");
for(i = 0; W_ERROR_IS_OK(error = key->hive->functions->get_value_by_index(mem_ctx, key, i, &dest)); i++);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*count = i;
if(W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) error = WERR_OK;
@@ -490,7 +490,7 @@ WERROR reg_key_subkeysizes(struct registry_key *key, uint32 *max_subkeylen, uint
i++;
} while (W_ERROR_IS_OK(error));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_OK;
}
@@ -517,7 +517,7 @@ WERROR reg_key_valuesizes(struct registry_key *key, uint32 *max_valnamelen, uint
i++;
} while (W_ERROR_IS_OK(error));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_OK;
}
diff --git a/source4/lib/registry/common/reg_util.c b/source4/lib/registry/common/reg_util.c
index ef46dd6174..b11b24151e 100644
--- a/source4/lib/registry/common/reg_util.c
+++ b/source4/lib/registry/common/reg_util.c
@@ -99,7 +99,7 @@ char *reg_val_description(TALLOC_CTX *mem_ctx, struct registry_value *val)
BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, struct registry_value **value)
{
int i;
- *value = talloc_p(mem_ctx, struct registry_value);
+ *value = talloc(mem_ctx, struct registry_value);
(*value)->data_type = -1;
/* Find the correct type */
@@ -123,7 +123,7 @@ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *da
break;
case REG_DWORD:
(*value)->data_len = sizeof(uint32);
- (*value)->data_blk = talloc_p(mem_ctx, uint32);
+ (*value)->data_blk = talloc(mem_ctx, uint32);
*((uint32 *)(*value)->data_blk) = strtol(data_str, NULL, 0);
break;
@@ -264,7 +264,7 @@ WERROR reg_key_del_abs(struct registry_context *ctx, const char *path)
error = reg_key_del(parent, n);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return error;
}
diff --git a/source4/lib/registry/reg_backend_dir.c b/source4/lib/registry/reg_backend_dir.c
index 4af219facb..bac0f43c20 100644
--- a/source4/lib/registry/reg_backend_dir.c
+++ b/source4/lib/registry/reg_backend_dir.c
@@ -41,7 +41,7 @@ static WERROR reg_dir_del_key(struct registry_key *k, const char *name)
if (rmdir(child) == 0) ret = WERR_OK; else ret = WERR_GENERAL_FAILURE;
- talloc_destroy(child);
+ talloc_free(child);
return ret;
}
@@ -67,7 +67,7 @@ static WERROR reg_dir_open_key(TALLOC_CTX *mem_ctx, struct registry_key *p, cons
return WERR_BADFILE;
}
closedir(d);
- ret = talloc_p(mem_ctx, struct registry_key);
+ ret = talloc(mem_ctx, struct registry_key);
ret->hive = p->hive;
ret->path = fullpath;
ret->backend_data = unixpath;
@@ -98,7 +98,7 @@ static WERROR reg_dir_key_by_index(TALLOC_CTX *mem_ctx, struct registry_key *k,
if(S_ISDIR(stbuf.st_mode)) {
if(i == idx) {
- (*key) = talloc_p(mem_ctx, struct registry_key);
+ (*key) = talloc(mem_ctx, struct registry_key);
(*key)->name = e->d_name;
(*key)->path = NULL;
(*key)->backend_data = talloc_strdup(mem_ctx, thispath);
@@ -122,7 +122,7 @@ static WERROR reg_dir_open(struct registry_hive *h, struct registry_key **key)
{
if(!h->location) return WERR_INVALID_PARAM;
- *key = talloc_p(h, struct registry_key);
+ *key = talloc(h, struct registry_key);
(*key)->backend_data = talloc_strdup(*key, h->location);
return WERR_OK;
}
diff --git a/source4/lib/registry/reg_backend_gconf.c b/source4/lib/registry/reg_backend_gconf.c
index 47d8c760ab..a912a42e55 100644
--- a/source4/lib/registry/reg_backend_gconf.c
+++ b/source4/lib/registry/reg_backend_gconf.c
@@ -35,7 +35,7 @@ static WERROR reg_open_gconf_hive(struct registry_hive *h, struct registry_key *
h->backend_data = (void *)gconf_client_get_default();
if(!h->backend_data) return WERR_FOOBAR;
- *k = talloc_p(h, struct registry_key);
+ *k = talloc(h, struct registry_key);
(*k)->name = talloc_strdup(*k, "");
(*k)->path = talloc_strdup(*k, "");
(*k)->backend_data = talloc_strdup(*k, "/");
@@ -57,7 +57,7 @@ static WERROR gconf_open_key (TALLOC_CTX *mem_ctx, struct registry_key *h, const
return WERR_DEST_NOT_FOUND;
}
- ret = talloc_p(mem_ctx, struct registry_key);
+ ret = talloc(mem_ctx, struct registry_key);
ret->backend_data = fullpath;
*key = ret;
@@ -83,7 +83,7 @@ static WERROR gconf_get_value_by_id(TALLOC_CTX *mem_ctx, struct registry_key *p,
entry = cur->data;
value = gconf_entry_get_value(entry);
- newval = talloc_p(mem_ctx, struct registry_value);
+ newval = talloc(mem_ctx, struct registry_value);
newval->name = talloc_strdup(mem_ctx, strrchr(gconf_entry_get_key(entry), '/')+1);
if(value) {
switch(value->type) {
@@ -99,20 +99,20 @@ static WERROR gconf_get_value_by_id(TALLOC_CTX *mem_ctx, struct registry_key *p,
case GCONF_VALUE_INT:
newval->data_type = REG_DWORD;
- newval->data_blk = talloc_p(mem_ctx, long);
+ newval->data_blk = talloc(mem_ctx, long);
*((long *)newval->data_blk) = gconf_value_get_int(value);
newval->data_len = sizeof(long);
break;
case GCONF_VALUE_FLOAT:
- newval->data_blk = talloc_p(mem_ctx, double);
+ newval->data_blk = talloc(mem_ctx, double);
newval->data_type = REG_BINARY;
*((double *)newval->data_blk) = gconf_value_get_float(value);
newval->data_len = sizeof(double);
break;
case GCONF_VALUE_BOOL:
- newval->data_blk = talloc_p(mem_ctx, BOOL);
+ newval->data_blk = talloc(mem_ctx, BOOL);
newval->data_type = REG_BINARY;
*((BOOL *)newval->data_blk) = gconf_value_get_bool(value);
newval->data_len = sizeof(BOOL);
@@ -142,7 +142,7 @@ static WERROR gconf_get_subkey_by_id(TALLOC_CTX *mem_ctx, struct registry_key *p
if(!cur) return WERR_NO_MORE_ITEMS;
- *sub = talloc_p(mem_ctx, struct registry_key);
+ *sub = talloc(mem_ctx, struct registry_key);
(*sub)->name = talloc_strdup(mem_ctx, strrchr((char *)cur->data, '/')+1);
(*sub)->backend_data = talloc_strdup(mem_ctx, cur->data);
diff --git a/source4/lib/registry/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb.c
index e0d7b6e2cb..930ea9642e 100644
--- a/source4/lib/registry/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb.c
@@ -52,7 +52,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, c
case REG_DWORD_LE:
*len = 4;
- *data = talloc_p(mem_ctx, uint32);
+ *data = talloc(mem_ctx, uint32);
SIVAL(*data, 0, strtol(val->data, NULL, 0));
break;
@@ -66,7 +66,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, c
static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, TALLOC_CTX *mem_ctx, const char *name, uint32 type, void *data, int len)
{
struct ldb_val val;
- struct ldb_message *msg = talloc_zero_p(mem_ctx, struct ldb_message);
+ struct ldb_message *msg = talloc_zero(mem_ctx, struct ldb_message);
char *type_s;
ldb_msg_add_string(ctx, msg, "value", talloc_strdup(mem_ctx, name));
@@ -165,10 +165,10 @@ static WERROR ldb_get_subkey_by_id(TALLOC_CTX *mem_ctx, struct registry_key *k,
el = ldb_msg_find_element(kd->subkeys[idx], "key");
- *subkey = talloc_p(mem_ctx, struct registry_key);
+ *subkey = talloc(mem_ctx, struct registry_key);
talloc_set_destructor(*subkey, reg_close_ldb_key);
(*subkey)->name = talloc_strdup(mem_ctx, el->values[0].data);
- (*subkey)->backend_data = newkd = talloc_zero_p(*subkey, struct ldb_key_data);
+ (*subkey)->backend_data = newkd = talloc_zero(*subkey, struct ldb_key_data);
newkd->dn = talloc_strdup(mem_ctx, kd->subkeys[idx]->dn);
return WERR_OK;
@@ -191,7 +191,7 @@ static WERROR ldb_get_value_by_id(TALLOC_CTX *mem_ctx, struct registry_key *k, i
if(idx >= kd->value_count) return WERR_NO_MORE_ITEMS;
- *value = talloc_p(mem_ctx, struct registry_value);
+ *value = talloc(mem_ctx, struct registry_value);
reg_ldb_unpack_value(mem_ctx, kd->values[idx], &(*value)->name, &(*value)->data_type, &(*value)->data_blk, &(*value)->data_len);
@@ -217,10 +217,10 @@ static WERROR ldb_open_key(TALLOC_CTX *mem_ctx, struct registry_key *h, const ch
return WERR_FOOBAR;
}
- *key = talloc_p(mem_ctx, struct registry_key);
+ *key = talloc(mem_ctx, struct registry_key);
talloc_set_destructor(*key, reg_close_ldb_key);
(*key)->name = talloc_strdup(mem_ctx, strrchr(name, '\\')?strchr(name, '\\'):name);
- (*key)->backend_data = newkd = talloc_zero_p(*key, struct ldb_key_data);
+ (*key)->backend_data = newkd = talloc_zero(*key, struct ldb_key_data);
newkd->dn = talloc_strdup(mem_ctx, msg[0]->dn);
ldb_search_free(c, msg);
@@ -247,11 +247,11 @@ static WERROR ldb_open_hive(struct registry_hive *hive, struct registry_key **k)
ldb_set_debug_stderr(c);
hive->backend_data = c;
- *k = talloc_zero_p(hive, struct registry_key);
+ *k = talloc_zero(hive, struct registry_key);
talloc_set_destructor (*k, reg_close_ldb_key);
talloc_set_destructor (hive, ldb_close_hive);
(*k)->name = talloc_strdup(*k, "");
- (*k)->backend_data = kd = talloc_zero_p(*k, struct ldb_key_data);
+ (*k)->backend_data = kd = talloc_zero(*k, struct ldb_key_data);
kd->dn = talloc_strdup(*k, "hive=");
@@ -277,10 +277,10 @@ static WERROR ldb_add_key (TALLOC_CTX *mem_ctx, struct registry_key *parent, con
return WERR_FOOBAR;
}
- *newkey = talloc_zero_p(mem_ctx, struct registry_key);
+ *newkey = talloc_zero(mem_ctx, struct registry_key);
(*newkey)->name = talloc_strdup(mem_ctx, name);
- (*newkey)->backend_data = newkd = talloc_zero_p(*newkey, struct ldb_key_data);
+ (*newkey)->backend_data = newkd = talloc_zero(*newkey, struct ldb_key_data);
newkd->dn = talloc_steal(newkd, msg->dn);
return WERR_OK;
@@ -294,7 +294,7 @@ static WERROR ldb_del_key (struct registry_key *key, const char *child)
ret = ldb_delete(key->hive->backend_data, childdn);
- talloc_destroy(childdn);
+ talloc_free(childdn);
if (ret < 0) {
DEBUG(1, ("ldb_del_key: %s\n", ldb_errstring(key->hive->backend_data)));
@@ -312,7 +312,7 @@ static WERROR ldb_del_value (struct registry_key *key, const char *child)
ret = ldb_delete(key->hive->backend_data, childdn);
- talloc_destroy(childdn);
+ talloc_free(childdn);
if (ret < 0) {
DEBUG(1, ("ldb_del_value: %s\n", ldb_errstring(key->hive->backend_data)));
@@ -339,12 +339,12 @@ static WERROR ldb_set_value (struct registry_key *parent, const char *name, uint
ret = ldb_modify(ctx, msg);
if (ret < 0) {
DEBUG(1, ("ldb_msg_add: %s\n", ldb_errstring(parent->hive->backend_data)));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_FOOBAR;
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_OK;
}
diff --git a/source4/lib/registry/reg_backend_nt4.c b/source4/lib/registry/reg_backend_nt4.c
index cd3be85a23..88033a8a8b 100644
--- a/source4/lib/registry/reg_backend_nt4.c
+++ b/source4/lib/registry/reg_backend_nt4.c
@@ -902,7 +902,7 @@ static WERROR vk_to_val(TALLOC_CTX *mem_ctx, struct registry_key *parent, VK_HDR
dat_len = IVAL(&vk_hdr->dat_len,0); /* If top bit, offset contains data */
dat_off = IVAL(&vk_hdr->dat_off,0);
- tmp = talloc_p(mem_ctx, struct registry_value);
+ tmp = talloc(mem_ctx, struct registry_value);
tmp->data_type = dat_type;
if (flag & FLAG_HAS_NAME) {
@@ -1070,7 +1070,7 @@ static WERROR nk_to_key(TALLOC_CTX *mem_ctx, struct registry_hive *h, NK_HDR *nk
return WERR_GENERAL_FAILURE;
}
- tmp = talloc_p(mem_ctx, struct registry_key);
+ tmp = talloc(mem_ctx, struct registry_key);
tmp->name = talloc_strdup(mem_ctx, key_name);
tmp->backend_data = nk_hdr;
@@ -1574,7 +1574,7 @@ static WERROR nt_open_hive (struct registry_hive *h, struct registry_key **key)
uint_t regf_id, hbin_id;
HBIN_HDR *hbin_hdr;
- regf = (REGF *)talloc_p(h, REGF);
+ regf = (REGF *)talloc(h, REGF);
memset(regf, 0, sizeof(REGF));
regf->owner_sid_str = NULL; /* FIXME: Fill in */
h->backend_data = regf;
diff --git a/source4/lib/registry/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc.c
index c5ed9b2c88..d2809f644a 100644
--- a/source4/lib/registry/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc.c
@@ -109,14 +109,14 @@ static WERROR rpc_get_predefined_key (struct registry_context *ctx, uint32 hkey_
return WERR_NO_MORE_ITEMS;
}
- h = talloc_p(ctx, struct registry_hive);
+ h = talloc(ctx, struct registry_hive);
h->functions = &reg_backend_rpc;
h->location = NULL;
h->backend_data = ctx->backend_data;
- (*k) = h->root = talloc_p(h, struct registry_key);
+ (*k) = h->root = talloc(h, struct registry_key);
(*k)->hive = h;
- (*k)->backend_data = mykeydata = talloc_p(*k, struct rpc_key_data);
+ (*k)->backend_data = mykeydata = talloc(*k, struct rpc_key_data);
mykeydata->num_values = -1;
mykeydata->num_subkeys = -1;
return known_hives[n].open((struct dcerpc_pipe *)ctx->backend_data, *k, &(mykeydata->pol));
@@ -135,7 +135,7 @@ static WERROR rpc_key_put_rpc_data(TALLOC_CTX *mem_ctx, struct registry_key *k)
struct winreg_OpenKey r;
struct rpc_key_data *mykeydata;
- k->backend_data = mykeydata = talloc_p(mem_ctx, struct rpc_key_data);
+ k->backend_data = mykeydata = talloc(mem_ctx, struct rpc_key_data);
mykeydata->num_values = -1;
mykeydata->num_subkeys = -1;
@@ -159,10 +159,10 @@ static WERROR rpc_open_key(TALLOC_CTX *mem_ctx, struct registry_key *h, const ch
struct rpc_key_data *mykeydata;
struct winreg_OpenKey r;
- *key = talloc_p(mem_ctx, struct registry_key);
+ *key = talloc(mem_ctx, struct registry_key);
(*key)->name = talloc_strdup(mem_ctx, name);
- (*key)->backend_data = mykeydata = talloc_p(mem_ctx, struct rpc_key_data);
+ (*key)->backend_data = mykeydata = talloc(mem_ctx, struct rpc_key_data);
mykeydata->num_values = -1;
mykeydata->num_subkeys = -1;
@@ -217,7 +217,7 @@ static WERROR rpc_get_value_by_index(TALLOC_CTX *mem_ctx, struct registry_key *p
if(NT_STATUS_IS_OK(status) &&
W_ERROR_IS_OK(r.out.result) && r.out.length) {
- *value = talloc_p(mem_ctx, struct registry_value);
+ *value = talloc(mem_ctx, struct registry_value);
(*value)->name = talloc_strdup(mem_ctx, r.out.name_out.name);
(*value)->data_type = type;
(*value)->data_len = *r.out.length;
@@ -266,7 +266,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, cons
init_winreg_String(&r.in.class, NULL);
r.in.handle = parent->backend_data;
- r.out.handle = talloc_p(mem_ctx, struct policy_handle);
+ r.out.handle = talloc(mem_ctx, struct policy_handle);
r.in.options = 0;
r.in.access_mask = access_mask;
r.in.sec_desc = NULL;
@@ -279,7 +279,7 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, cons
}
if (W_ERROR_IS_OK(r.out.result)) {
- *key = talloc_p(mem_ctx, struct registry_key);
+ *key = talloc(mem_ctx, struct registry_key);
(*key)->name = talloc_strdup(*key, name);
(*key)->backend_data = r.out.handle;
}
@@ -298,7 +298,7 @@ static WERROR rpc_query_key(struct registry_key *k)
r.in.handle = &mykeydata->pol;
status = dcerpc_winreg_QueryInfoKey((struct dcerpc_pipe *)(k->hive->backend_data), mem_ctx, &r);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("QueryInfoKey failed - %s\n", nt_errstr(status)));
@@ -327,7 +327,7 @@ static WERROR rpc_del_key(struct registry_key *parent, const char *name)
status = dcerpc_winreg_DeleteKey((struct dcerpc_pipe *)parent->hive->backend_data, mem_ctx, &r);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return r.out.result;
}
@@ -374,7 +374,7 @@ WERROR reg_open_remote (struct registry_context **ctx, const char *user, const c
NTSTATUS status;
struct dcerpc_pipe *p;
- *ctx = talloc_p(NULL, struct registry_context);
+ *ctx = talloc(NULL, struct registry_context);
/* Default to local smbd if no connection is specified */
if (!location) {
diff --git a/source4/lib/registry/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95.c
index 957039dea3..ff02f4d12b 100644
--- a/source4/lib/registry/reg_backend_w95.c
+++ b/source4/lib/registry/reg_backend_w95.c
@@ -187,7 +187,7 @@ static WERROR w95_open_reg (struct registry_hive *h, struct registry_key **root)
DWORD i;
DWORD offset;
- creg = talloc_p(h, CREG);
+ creg = talloc(h, CREG);
memset(creg, 0, sizeof(CREG));
h->backend_data = creg;
@@ -234,7 +234,7 @@ static WERROR w95_open_reg (struct registry_hive *h, struct registry_key **root)
}
#endif
- creg->rgdb_keys = talloc_array_p(h, RGDB_KEY **, creg->creg_hdr->num_rgdb);
+ creg->rgdb_keys = talloc_array(h, RGDB_KEY **, creg->creg_hdr->num_rgdb);
offset = 0;
DEBUG(3, ("Reading %d rgdb entries\n", creg->creg_hdr->num_rgdb));
@@ -250,7 +250,7 @@ static WERROR w95_open_reg (struct registry_hive *h, struct registry_key **root)
}
- creg->rgdb_keys[i] = talloc_array_p(h, RGDB_KEY *, rgdb_hdr->max_id+1);
+ creg->rgdb_keys[i] = talloc_array(h, RGDB_KEY *, rgdb_hdr->max_id+1);
memset(creg->rgdb_keys[i], 0, sizeof(RGDB_KEY *) * (rgdb_hdr->max_id+1));
parse_rgdb_block(creg, rgdb_hdr);
@@ -259,7 +259,7 @@ static WERROR w95_open_reg (struct registry_hive *h, struct registry_key **root)
}
/* First element in rgkn should be root key */
- *root = talloc_p(h, struct registry_key);
+ *root = talloc(h, struct registry_key);
(*root)->name = NULL;
(*root)->backend_data = LOCN_RGKN(creg, sizeof(RGKN_HDR));
@@ -288,7 +288,7 @@ static WERROR w95_get_subkey_by_index (TALLOC_CTX *mem_ctx, struct registry_key
DEBUG(0, ("Can't find %d,%d in RGDB table!\n", child->id.rgdb, child->id.id));
return WERR_FOOBAR;
}
- *key = talloc_p(mem_ctx, struct registry_key);
+ *key = talloc(mem_ctx, struct registry_key);
(*key)->backend_data = child;
(*key)->name = talloc_strndup(mem_ctx, (char *)rgdb_key + sizeof(RGDB_KEY), rgdb_key->name_len);
return WERR_OK;
@@ -331,7 +331,7 @@ static WERROR w95_get_value_by_id(TALLOC_CTX *mem_ctx, struct registry_key *k, i
offset+=sizeof(RGDB_VALUE) + curval->name_len + curval->data_len;
}
- *value = talloc_p(mem_ctx, struct registry_value);
+ *value = talloc(mem_ctx, struct registry_value);
(*value)->name = talloc_strndup(mem_ctx, (char *)curval+sizeof(RGDB_VALUE), curval->name_len);
(*value)->data_len = curval->data_len;
diff --git a/source4/lib/registry/reg_samba.c b/source4/lib/registry/reg_samba.c
index 62973a14ab..a81b9e5a42 100644
--- a/source4/lib/registry/reg_samba.c
+++ b/source4/lib/registry/reg_samba.c
@@ -59,14 +59,14 @@ static WERROR reg_samba_get_predef (struct registry_context *ctx, uint32 hkey, s
error = reg_open_hive(ctx, backend, location, NULL, k);
- talloc_destroy(backend);
+ talloc_free(backend);
return error;
}
WERROR reg_open_local (struct registry_context **ctx)
{
- *ctx = talloc_p(NULL, struct registry_context);
+ *ctx = talloc(NULL, struct registry_context);
(*ctx)->get_predefined_key = reg_samba_get_predef;
return WERR_OK;
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 8d88cafe59..ceae3a427e 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -41,7 +41,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while getting subkey by index: %d\n", W_ERROR_V(error1)));
@@ -60,7 +60,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
writediff(t2, t1, out);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while getting subkey by index: %d\n", W_ERROR_V(error1)));
@@ -82,7 +82,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while getting value by index: %d\n", W_ERROR_V(error1)));
@@ -101,7 +101,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error1, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while getting value by index: %d\n", W_ERROR_V(error1)));
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 1dd0e04561..ac7dbca49b 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -329,14 +329,14 @@ static char **reg_complete_key(const char *text, int start, int end)
break;
} else {
printf("Error creating completion list: %s\n", win_errstr(status));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
}
if (j == 1) { /* No matches at all */
SAFE_FREE(matches);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -345,7 +345,7 @@ static char **reg_complete_key(const char *text, int start, int end)
} else {
asprintf(&matches[0], "%s%s", base_n, talloc_strndup(mem_ctx, matches[1], samelen));
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
matches[j] = NULL;
return matches;
@@ -435,7 +435,7 @@ static char **reg_completion(const char *text, int start, int end)
if(new)curkey = new;
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return 0;
}
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index a6beb2b484..f061f33bd3 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -47,7 +47,7 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals)
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, p, i, &subkey)); i++) {
print_tree(l+1, subkey, fullpath, novals);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while fetching subkeys for '%s': %s\n", p->path, win_errstr(error)));
@@ -62,7 +62,7 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals)
desc = reg_val_description(mem_ctx, value);
printf("%s\n", desc);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if(!W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) {
DEBUG(0, ("Error occured while fetching values for '%s': %s\n", p->path, win_errstr(error)));
diff --git a/source4/lib/socket/socket_ipv4.c b/source4/lib/socket/socket_ipv4.c
index d6b6bf7be4..aaa5ce0fa2 100644
--- a/source4/lib/socket/socket_ipv4.c
+++ b/source4/lib/socket/socket_ipv4.c
@@ -202,7 +202,7 @@ static NTSTATUS ipv4_accept(struct socket_context *sock, struct socket_context *
* --metze
*/
- (*new_sock) = talloc_p(NULL, struct socket_context);
+ (*new_sock) = talloc(NULL, struct socket_context);
if (!(*new_sock)) {
close(new_fd);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/lib/socket/socket_ipv6.c b/source4/lib/socket/socket_ipv6.c
index 27e452b14e..1dd7fe8e9d 100644
--- a/source4/lib/socket/socket_ipv6.c
+++ b/source4/lib/socket/socket_ipv6.c
@@ -179,7 +179,7 @@ static NTSTATUS ipv6_tcp_accept(struct socket_context *sock, struct socket_conte
* --metze
*/
- (*new_sock) = talloc_p(NULL, struct socket_context);
+ (*new_sock) = talloc(NULL, struct socket_context);
if (!(*new_sock)) {
close(new_fd);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c
index bdd68f9d9d..e23aa0d97e 100644
--- a/source4/lib/socket/socket_unix.c
+++ b/source4/lib/socket/socket_unix.c
@@ -162,7 +162,7 @@ static NTSTATUS unixdom_accept(struct socket_context *sock,
}
}
- (*new_sock) = talloc_p(NULL, struct socket_context);
+ (*new_sock) = talloc(NULL, struct socket_context);
if (!(*new_sock)) {
close(new_fd);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/lib/unix_privs.c b/source4/lib/unix_privs.c
index c65f490aeb..a57f4359d3 100644
--- a/source4/lib/unix_privs.c
+++ b/source4/lib/unix_privs.c
@@ -57,7 +57,7 @@ static int privileges_destructor(void *ptr)
void *root_privileges(void)
{
struct saved_state *s;
- s = talloc_p(NULL, struct saved_state);
+ s = talloc(NULL, struct saved_state);
if (!s) return NULL;
s->uid = geteuid();
if (s->uid != 0) {
diff --git a/source4/lib/util_sock.c b/source4/lib/util_sock.c
index 876698535b..7fe42f7ffc 100644
--- a/source4/lib/util_sock.c
+++ b/source4/lib/util_sock.c
@@ -428,7 +428,7 @@ int open_udp_socket(const char *host, int port)
sock_out.sin_port = htons(port);
sock_out.sin_family = PF_INET;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (connect(res,(struct sockaddr *)&sock_out,sizeof(sock_out))) {
close(res);
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index b3ec27de74..d9c4e30d6a 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -1057,7 +1057,7 @@ BOOL add_string_to_array(TALLOC_CTX *mem_ctx,
{
char *dup_str = talloc_strdup(mem_ctx, str);
- *strings = talloc_realloc_p(mem_ctx,
+ *strings = talloc_realloc(mem_ctx,
*strings,
const char *, ((*num)+1));
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index bd4aea7c41..e589e6493a 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -41,7 +41,7 @@ static void load_case_tables(void)
}
upcase_table = map_file(lib_path(mem_ctx, "upcase.dat"), 0x20000);
lowcase_table = map_file(lib_path(mem_ctx, "lowcase.dat"), 0x20000);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (upcase_table == NULL) {
upcase_table = (void *)-1;
}
diff --git a/source4/libads/ldap.c b/source4/libads/ldap.c
index e4b371e2d5..d63d667777 100644
--- a/source4/libads/ldap.c
+++ b/source4/libads/ldap.c
@@ -277,7 +277,7 @@ static struct berval *dup_berval(TALLOC_CTX *ctx, const struct berval *in_val)
if (!in_val) return NULL;
- value = talloc_zero_p(ctx, struct berval);
+ value = talloc_zero(ctx, struct berval);
if (value == NULL)
return NULL;
if (in_val->bv_len == 0) return value;
@@ -479,7 +479,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
ldap_controls_free(rcontrols);
done:
- talloc_destroy(ctx);
+ talloc_free(ctx);
/* if/when we decide to utf8-encode attrs, take out this next line */
str_list_free(&search_attrs);
@@ -641,7 +641,7 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope,
}
done:
- talloc_destroy(ctx);
+ talloc_free(ctx);
/* if/when we decide to utf8-encode attrs, take out this next line */
str_list_free(&search_attrs);
return ADS_ERROR(rc);
@@ -805,7 +805,7 @@ static ADS_STATUS ads_modlist_add(TALLOC_CTX *ctx, ADS_MODLIST *mods,
*mods = modlist;
}
- if (!(modlist[curmod] = talloc_zero_p(ctx, LDAPMod)))
+ if (!(modlist[curmod] = talloc_zero(ctx, LDAPMod)))
return ADS_ERROR(LDAP_NO_MEMORY);
modlist[curmod]->mod_type = talloc_strdup(ctx, name);
if (mod_op & LDAP_MOD_BVALUES) {
@@ -1088,7 +1088,7 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname,
}
}
done:
- talloc_destroy(ctx);
+ talloc_free(ctx);
return ret;
}
@@ -1158,13 +1158,13 @@ static void dump_sd(const char *filed, struct berval **values)
/* parse secdesc */
if (!sec_io_desc("sd", &psd, &ps, 1)) {
prs_mem_free(&ps);
- talloc_destroy(ctx);
+ talloc_free(ctx);
return;
}
if (psd) ads_disp_sd(psd);
prs_mem_free(&ps);
- talloc_destroy(ctx);
+ talloc_free(ctx);
}
/*
@@ -1292,7 +1292,7 @@ void ads_process_results(ADS_STRUCT *ads, void *res,
fn(NULL, NULL, data_area); /* completed an entry */
}
- talloc_destroy(ctx);
+ talloc_free(ctx);
}
/**
@@ -1514,7 +1514,7 @@ ADS_STATUS ads_set_machine_sd(ADS_STRUCT *ads, const char *hostname, char *dn)
ads_set_sd_error:
ads_msgfree(ads, res);
prs_mem_free(&ps_wire);
- talloc_destroy(ctx);
+ talloc_free(ctx);
return ret;
}
@@ -1593,7 +1593,7 @@ char **ads_pull_strings(ADS_STRUCT *ads,
*num_values = ldap_count_values(values);
- ret = talloc_array_p(mem_ctx, char *, *num_values+1);
+ ret = talloc_array(mem_ctx, char *, *num_values+1);
if (!ret) {
ldap_value_free(values);
return NULL;
@@ -1840,7 +1840,7 @@ int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
for (i=0; values[i]; i++)
/* nop */ ;
- (*sids) = talloc_array_p(mem_ctx, DOM_SID, i);
+ (*sids) = talloc_array(mem_ctx, DOM_SID, i);
if (!(*sids)) {
ldap_value_free_len(values);
return 0;
@@ -2000,7 +2000,7 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
p = strchr(value, ':');
if (!p) {
- talloc_destroy(ctx);
+ talloc_free(ctx);
DEBUG(1, ("ads_server_info: returned ldap server name did not contain a ':' "
"so was deemed invalid\n"));
return ADS_ERROR(LDAP_DECODING_ERROR);
@@ -2011,7 +2011,7 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
ads->config.ldap_server_name = strdup(p+1);
p = strchr(ads->config.ldap_server_name, '$');
if (!p || p[1] != '@') {
- talloc_destroy(ctx);
+ talloc_free(ctx);
DEBUG(1, ("ads_server_info: returned ldap server name (%s) does not contain '$@'"
" so was deemed invalid\n", ads->config.ldap_server_name));
SAFE_FREE(ads->config.ldap_server_name);
@@ -2037,7 +2037,7 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
DEBUG(4,("time offset is %d seconds\n", ads->auth.time_offset));
}
- talloc_destroy(ctx);
+ talloc_free(ctx);
return ADS_SUCCESS;
}
diff --git a/source4/libads/ldap_printer.c b/source4/libads/ldap_printer.c
index 71cc8a531f..7ae19219b4 100644
--- a/source4/libads/ldap_printer.c
+++ b/source4/libads/ldap_printer.c
@@ -162,7 +162,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
};
if (num_vals) {
- str_values = talloc_array_p(ctx, char *, num_vals + 1);
+ str_values = talloc_array(ctx, char *, num_vals + 1);
cur_str = value->data_p;
for (i=0; i < num_vals; i++) {
pull_ucs2_talloc(ctx, &str_values[i], cur_str);
diff --git a/source4/libads/ldap_user.c b/source4/libads/ldap_user.c
index 56a0d8013b..0032f8c9ab 100644
--- a/source4/libads/ldap_user.c
+++ b/source4/libads/ldap_user.c
@@ -80,7 +80,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
status = ads_gen_add(ads, new_dn, mods);
done:
- talloc_destroy(ctx);
+ talloc_free(ctx);
return status;
}
@@ -113,7 +113,7 @@ ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
status = ads_gen_add(ads, new_dn, mods);
done:
- talloc_destroy(ctx);
+ talloc_free(ctx);
return status;
}
#endif
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index 122f9510e7..051798c9f1 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -321,7 +321,7 @@ static BOOL ads_cleanup_expired_creds(krb5_context context,
krb5_cc_default_name(context),
http_timestring(mem_ctx, credsp->times.endtime)));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
/* we will probably need new tickets if the current ones
will expire within 10 seconds.
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index fb638a9000..e9dea6be33 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -94,7 +94,7 @@ const char **gensec_security_oids(TALLOC_CTX *mem_ctx, const char *skip)
if (!ops) {
return NULL;
}
- oid_list = talloc_array_p(mem_ctx, const char *, num_backends + 1);
+ oid_list = talloc_array(mem_ctx, const char *, num_backends + 1);
if (!oid_list) {
return NULL;
}
@@ -123,7 +123,7 @@ const char **gensec_security_oids(TALLOC_CTX *mem_ctx, const char *skip)
*/
static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx, struct gensec_security **gensec_security)
{
- (*gensec_security) = talloc_p(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc(mem_ctx, struct gensec_security);
if (!(*gensec_security)) {
return NT_STATUS_NO_MEMORY;
}
@@ -155,7 +155,7 @@ NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
struct gensec_security *parent,
struct gensec_security **gensec_security)
{
- (*gensec_security) = talloc_p(mem_ctx, struct gensec_security);
+ (*gensec_security) = talloc(mem_ctx, struct gensec_security);
if (!(*gensec_security)) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_gssapi.c b/source4/libcli/auth/gensec_gssapi.c
index 80a17c1b6b..43113412f7 100644
--- a/source4/libcli/auth/gensec_gssapi.c
+++ b/source4/libcli/auth/gensec_gssapi.c
@@ -62,7 +62,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
{
struct gensec_gssapi_state *gensec_gssapi_state;
- gensec_gssapi_state = talloc_p(gensec_security, struct gensec_gssapi_state);
+ gensec_gssapi_state = talloc(gensec_security, struct gensec_gssapi_state);
if (!gensec_gssapi_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index aaf892e1e6..e5bfd3865a 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -258,7 +258,7 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security)
struct gensec_krb5_state *gensec_krb5_state;
krb5_error_code ret = 0;
- gensec_krb5_state = talloc_p(gensec_security, struct gensec_krb5_state);
+ gensec_krb5_state = talloc(gensec_security, struct gensec_krb5_state);
if (!gensec_krb5_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/gensec_ntlmssp.c b/source4/libcli/auth/gensec_ntlmssp.c
index ae97803ef7..59bab6ced2 100644
--- a/source4/libcli/auth/gensec_ntlmssp.c
+++ b/source4/libcli/auth/gensec_ntlmssp.c
@@ -143,7 +143,7 @@ static NTSTATUS gensec_ntlmssp_start(struct gensec_security *gensec_security)
{
struct gensec_ntlmssp_state *gensec_ntlmssp_state;
- gensec_ntlmssp_state = talloc_p(gensec_security, struct gensec_ntlmssp_state);
+ gensec_ntlmssp_state = talloc(gensec_security, struct gensec_ntlmssp_state);
if (!gensec_ntlmssp_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index a9fb66d41e..d5ddcfbfb6 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -909,7 +909,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx, struct ntlmssp_state **ntlmssp_state)
{
- *ntlmssp_state = talloc_p(mem_ctx, struct ntlmssp_state);
+ *ntlmssp_state = talloc(mem_ctx, struct ntlmssp_state);
if (!*ntlmssp_state) {
DEBUG(0,("ntlmssp_server_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
@@ -1269,7 +1269,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
NTSTATUS ntlmssp_client_start(TALLOC_CTX *mem_ctx, struct ntlmssp_state **ntlmssp_state)
{
- *ntlmssp_state = talloc_p(mem_ctx, struct ntlmssp_state);
+ *ntlmssp_state = talloc(mem_ctx, struct ntlmssp_state);
if (!*ntlmssp_state) {
DEBUG(0,("ntlmssp_client_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c
index a713b9896d..543f3d9b61 100644
--- a/source4/libcli/auth/ntlmssp_parse.c
+++ b/source4/libcli/auth/ntlmssp_parse.c
@@ -54,8 +54,8 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
DATA_BLOB *pointers;
- pointers = talloc_array_p(mem_ctx, DATA_BLOB, strlen(format));
- intargs = talloc_array_p(pointers, int, strlen(format));
+ pointers = talloc_array(mem_ctx, DATA_BLOB, strlen(format));
+ intargs = talloc_array(pointers, int, strlen(format));
/* first scan the format to work out the header and body size */
va_start(ap, format);
diff --git a/source4/libcli/auth/schannel.c b/source4/libcli/auth/schannel.c
index 51b8690c97..92442234bd 100644
--- a/source4/libcli/auth/schannel.c
+++ b/source4/libcli/auth/schannel.c
@@ -289,7 +289,7 @@ NTSTATUS schannel_start(struct schannel_state **state,
const uint8_t session_key[16],
BOOL initiator)
{
- (*state) = talloc_p(NULL, struct schannel_state);
+ (*state) = talloc(NULL, struct schannel_state);
if (!(*state)) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index 1e92a7d16e..a61680c9d4 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -50,7 +50,7 @@ static NTSTATUS gensec_spnego_client_start(struct gensec_security *gensec_securi
{
struct spnego_state *spnego_state;
- spnego_state = talloc_p(gensec_security, struct spnego_state);
+ spnego_state = talloc(gensec_security, struct spnego_state);
if (!spnego_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -68,7 +68,7 @@ static NTSTATUS gensec_spnego_server_start(struct gensec_security *gensec_securi
{
struct spnego_state *spnego_state;
- spnego_state = talloc_p(gensec_security, struct spnego_state);
+ spnego_state = talloc(gensec_security, struct spnego_state);
if (!spnego_state) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index 78a94a6a44..e48c32f0da 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_p(NULL, const char *);
+ token->mechTypes = talloc(NULL, const char *);
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes = talloc_realloc(NULL,
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 354840b84c..263527ffc0 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -211,7 +211,7 @@ struct smbcli_state *smbcli_state_init(TALLOC_CTX *mem_ctx)
{
struct smbcli_state *cli;
- cli = talloc_zero_p(mem_ctx, struct smbcli_state);
+ cli = talloc_zero(mem_ctx, struct smbcli_state);
if (cli) {
ZERO_STRUCTP(cli);
}
diff --git a/source4/libcli/clifile.c b/source4/libcli/clifile.c
index 992d2c225d..0b9cac4c07 100644
--- a/source4/libcli/clifile.c
+++ b/source4/libcli/clifile.c
@@ -252,7 +252,7 @@ int smbcli_nt_create_full(struct smbcli_tree *tree, const char *fname,
open_parms.ntcreatex.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &open_parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.ntcreatex.out.fnum;
@@ -319,7 +319,7 @@ int smbcli_open(struct smbcli_tree *tree, const char *fname, int flags,
open_parms.openx.in.fname = fname;
status = smb_raw_open(tree, mem_ctx, &open_parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.openx.out.fnum;
@@ -633,7 +633,7 @@ NTSTATUS smbcli_dskattr(struct smbcli_tree *tree, int *bsize, int *total, int *a
*avail = fsinfo_parms.dskattr.out.units_free;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -660,7 +660,7 @@ int smbcli_ctemp(struct smbcli_tree *tree, const char *path, char **tmp_path)
if (tmp_path) {
*tmp_path = strdup(open_parms.ctemp.out.name);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (NT_STATUS_IS_OK(status)) {
return open_parms.ctemp.out.fnum;
}
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index 77fd760837..0d69a386eb 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -147,7 +147,7 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
state.mem_ctx, &first_parms,
(void*)&state, smbcli_list_new_callback);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
@@ -192,7 +192,7 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
fn(&state.dirlist[i], Mask, caller_state);
}
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return state.total_received;
}
@@ -283,7 +283,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
smbcli_list_old_callback);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
@@ -307,7 +307,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
break;
}
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return -1;
}
received = next_parms.search_next.out.count;
@@ -321,7 +321,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
fn(&state.dirlist[i], Mask, caller_state);
}
- talloc_destroy(state.mem_ctx);
+ talloc_free(state.mem_ctx);
return state.total_received;
}
diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c
index eb2c671a95..6be92fa17d 100644
--- a/source4/libcli/clitrans2.c
+++ b/source4/libcli/clitrans2.c
@@ -38,7 +38,7 @@ NTSTATUS smbcli_qpathinfo(struct smbcli_tree *tree, const char *fname,
parms.standard.in.fname = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status))
return status;
@@ -80,7 +80,7 @@ NTSTATUS smbcli_qpathinfo2(struct smbcli_tree *tree, const char *fname,
parms.all_info.in.fname = fname;
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status))
return status;
@@ -124,14 +124,14 @@ NTSTATUS smbcli_qfilename(struct smbcli_tree *tree, int fnum, const char **name)
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*name = NULL;
return status;
}
*name = strdup(parms.name_info.out.fname.s);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -157,7 +157,7 @@ NTSTATUS smbcli_qfileinfo(struct smbcli_tree *tree, int fnum,
parms.all_info.in.fnum = fnum;
status = smb_raw_fileinfo(tree, mem_ctx, &parms);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -206,7 +206,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
status = smb_raw_pathinfo(tree, mem_ctx, &parms);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*alt_name = NULL;
return smbcli_nt_error(tree);
}
@@ -217,7 +217,7 @@ NTSTATUS smbcli_qpathinfo_alt_name(struct smbcli_tree *tree, const char *fname,
*alt_name = strdup(parms.alt_name_info.out.fname.s);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index b2a6bd957a..eab94bb194 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -130,7 +130,7 @@ static struct ldap_parse_tree *ldap_parse_simple(TALLOC_CTX *mem_ctx,
if (val && strchr("()&|", *val))
return NULL;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -157,7 +157,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
{
struct ldap_parse_tree *ret, *next;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -165,7 +165,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
ret->operation = op;
ret->u.list.num_elements = 1;
- ret->u.list.elements = talloc_p(mem_ctx, struct ldap_parse_tree *);
+ ret->u.list.elements = talloc(mem_ctx, struct ldap_parse_tree *);
if (!ret->u.list.elements) {
errno = ENOMEM;
return NULL;
@@ -180,7 +180,7 @@ static struct ldap_parse_tree *ldap_parse_filterlist(TALLOC_CTX *mem_ctx,
while (*s && (next = ldap_parse_filter(mem_ctx, &s))) {
struct ldap_parse_tree **e;
- e = talloc_realloc_p(ret,
+ e = talloc_realloc(ret,
ret->u.list.elements,
struct ldap_parse_tree *,
ret->u.list.num_elements+1);
@@ -205,7 +205,7 @@ static struct ldap_parse_tree *ldap_parse_not(TALLOC_CTX *mem_ctx, const char *s
{
struct ldap_parse_tree *ret;
- ret = talloc_p(mem_ctx, struct ldap_parse_tree);
+ ret = talloc(mem_ctx, struct ldap_parse_tree);
if (!ret) {
errno = ENOMEM;
return NULL;
@@ -448,7 +448,7 @@ BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result)
ldap_push_filter(&data, tree);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
asn1_push_tag(&data, ASN1_SEQUENCE(0));
@@ -1186,7 +1186,7 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg)
for (i=0; asn1_peek_tag(data, ASN1_SEQUENCE(0)); i++) {
asn1_start_tag(data, ASN1_SEQUENCE(0));
- ctrl = talloc_realloc_p(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
+ ctrl = talloc_realloc(msg->mem_ctx, ctrl, struct ldap_Control, i+1);
if (!ctrl) {
return False;
}
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 84fd0f1d64..c9e81ac28f 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -100,7 +100,7 @@ static struct ldap_connection *new_ldap_connection(TALLOC_CTX *mem_ctx)
{
struct ldap_connection *result;
- result = talloc_p(mem_ctx, struct ldap_connection);
+ result = talloc(mem_ctx, struct ldap_connection);
if (!result) {
return NULL;
@@ -158,7 +158,7 @@ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
{
struct ldap_message *result;
- result = talloc_p(mem_ctx, struct ldap_message);
+ result = talloc(mem_ctx, struct ldap_message);
if (!result) {
return NULL;
@@ -472,7 +472,7 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha
done:
if (mem_ctx)
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return result;
}
diff --git a/source4/libcli/ldap/ldap_ldif.c b/source4/libcli/ldap/ldap_ldif.c
index 809c75cf96..a0249a4ba0 100644
--- a/source4/libcli/ldap/ldap_ldif.c
+++ b/source4/libcli/ldap/ldap_ldif.c
@@ -159,7 +159,7 @@ static int next_attr(char **s, const char **attr, struct ldap_val *value)
BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldap_val *value,
struct ldap_attribute *attrib)
{
- attrib->values = talloc_realloc_p(mem_ctx,
+ attrib->values = talloc_realloc(mem_ctx,
attrib->values,
DATA_BLOB,
attrib->num_values+1);
@@ -177,7 +177,7 @@ BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_attribute **attribs,
int *num_attribs)
{
- *attribs = talloc_realloc_p(mem_ctx,
+ *attribs = talloc_realloc(mem_ctx,
*attribs,
struct ldap_attribute,
*num_attribs+1);
@@ -211,7 +211,7 @@ static BOOL fill_add_attributes(struct ldap_message *msg, char **chunk)
}
if (attrib == NULL) {
- r->attributes = talloc_realloc_p(msg->mem_ctx,
+ r->attributes = talloc_realloc(msg->mem_ctx,
r->attributes,
struct ldap_attribute,
r->num_attributes+1);
@@ -236,7 +236,7 @@ BOOL add_mod_to_array_talloc(TALLOC_CTX *mem_ctx,
struct ldap_mod **mods,
int *num_mods)
{
- *mods = talloc_realloc_p(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
+ *mods = talloc_realloc(mem_ctx, *mods, struct ldap_mod, (*num_mods)+1);
if (*mods == NULL)
return False;
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index 97e0212137..b2dac09f81 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -81,7 +81,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct smbcli_request *req,
return NT_STATUS_INVALID_PARAMETER;
}
- io->query_secdesc.out.sd = talloc_p(mem_ctx, struct security_descriptor);
+ io->query_secdesc.out.sd = talloc(mem_ctx, struct security_descriptor);
if (!io->query_secdesc.out.sd) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index ec8bacdf64..49be9a43e6 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -187,7 +187,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
blob2.data = blob->data + ofs;
blob2.length = ea_size - ofs;
- *eas = talloc_realloc_p(mem_ctx, *eas, struct ea_struct, n+1);
+ *eas = talloc_realloc(mem_ctx, *eas, struct ea_struct, n+1);
if (! *eas) return NT_STATUS_NO_MEMORY;
len = ea_pull_struct(&blob2, mem_ctx, &(*eas)[n]);
@@ -232,7 +232,7 @@ NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
blob2.data = blob->data + ofs + 4;
blob2.length = blob->length - (ofs + 4);
- *eas = talloc_realloc_p(mem_ctx, *eas, struct ea_struct, n+1);
+ *eas = talloc_realloc(mem_ctx, *eas, struct ea_struct, n+1);
if (! *eas) return NT_STATUS_NO_MEMORY;
len = ea_pull_struct(&blob2, mem_ctx, &(*eas)[n]);
@@ -312,7 +312,7 @@ NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
blob2.data = blob->data + ofs;
blob2.length = ea_size - ofs;
- *ea_names = talloc_realloc_p(mem_ctx, *ea_names, struct ea_name, n+1);
+ *ea_names = talloc_realloc(mem_ctx, *ea_names, struct ea_name, n+1);
if (! *ea_names) return NT_STATUS_NO_MEMORY;
len = ea_pull_name(&blob2, mem_ctx, &(*ea_names)[n]);
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index e0b54cacc3..c6652125c2 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -140,7 +140,7 @@ static struct smbcli_request *smb_raw_t2mkdir_send(struct smbcli_tree *tree,
req = smb_raw_trans2_send(tree, &t2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -383,7 +383,7 @@ static struct smbcli_request *smb_raw_t2open_send(struct smbcli_tree *tree,
req = smb_raw_trans2_send(tree, &t2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index 3befb8ee4d..88c2f0d0fc 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -182,7 +182,7 @@ static NTSTATUS smb_raw_info_backend(struct smbcli_session *session,
while (blob->length - ofs >= 24) {
uint_t n = parms->stream_info.out.num_streams;
parms->stream_info.out.streams =
- talloc_realloc_p(mem_ctx,
+ talloc_realloc(mem_ctx,
parms->stream_info.out.streams,
struct stream_struct,
n+1);
@@ -306,7 +306,7 @@ static struct smbcli_request *smb_raw_fileinfo_blob_send(struct smbcli_tree *tre
tp.in.params = data_blob_talloc(mem_ctx, NULL, 4);
if (!tp.in.params.data) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -315,7 +315,7 @@ static struct smbcli_request *smb_raw_fileinfo_blob_send(struct smbcli_tree *tre
req = smb_raw_trans2_send(tree, &tp);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -360,7 +360,7 @@ static struct smbcli_request *smb_raw_pathinfo_blob_send(struct smbcli_tree *tre
tp.in.params = data_blob_talloc(mem_ctx, NULL, 6);
if (!tp.in.params.data) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -371,7 +371,7 @@ static struct smbcli_request *smb_raw_pathinfo_blob_send(struct smbcli_tree *tre
req = smb_raw_trans2_send(tree, &tp);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 7fb12dcf80..7dbe6b3468 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -67,7 +67,7 @@ struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *tran
{
struct smbcli_request *req;
- req = talloc_p(transport, struct smbcli_request);
+ req = talloc(transport, struct smbcli_request);
if (!req) {
return NULL;
}
diff --git a/source4/libcli/raw/rawsetfileinfo.c b/source4/libcli/raw/rawsetfileinfo.c
index 9576bdf356..7934171ab0 100644
--- a/source4/libcli/raw/rawsetfileinfo.c
+++ b/source4/libcli/raw/rawsetfileinfo.c
@@ -274,7 +274,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
if (!mem_ctx) return NULL;
if (!smb_raw_setinfo_backend(tree, mem_ctx, parms, &blob)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -285,7 +285,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
parms->generic.level,
&blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
@@ -321,7 +321,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
if (!mem_ctx) return NULL;
if (!smb_raw_setinfo_backend(tree, mem_ctx, parms, &blob)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NULL;
}
@@ -332,7 +332,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
parms->generic.level,
&blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return req;
}
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index d76f9fa239..493ecab183 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -149,12 +149,12 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
if (sidstr[i] == '-') num_sub_auths++;
}
- ret = talloc_p(mem_ctx, struct dom_sid);
+ ret = talloc(mem_ctx, struct dom_sid);
if (!ret) {
return NULL;
}
- ret->sub_auths = talloc_array_p(mem_ctx, uint32_t, num_sub_auths);
+ ret->sub_auths = talloc_array(mem_ctx, uint32_t, num_sub_auths);
if (!ret->sub_auths) {
return NULL;
}
@@ -190,12 +190,12 @@ struct dom_sid *dom_sid_dup(TALLOC_CTX *mem_ctx, const struct dom_sid *dom_sid)
{
struct dom_sid *ret;
int i;
- ret = talloc_p(mem_ctx, struct dom_sid);
+ ret = talloc(mem_ctx, struct dom_sid);
if (!ret) {
return NULL;
}
- ret->sub_auths = talloc_array_p(ret, uint32_t, dom_sid->num_auths);
+ ret->sub_auths = talloc_array(ret, uint32_t, dom_sid->num_auths);
if (!ret->sub_auths) {
return NULL;
}
@@ -226,12 +226,12 @@ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
{
struct dom_sid *sid;
- sid = talloc_p(mem_ctx, struct dom_sid);
+ sid = talloc(mem_ctx, struct dom_sid);
if (!sid) return NULL;
*sid = *domain_sid;
- sid->sub_auths = talloc_array_p(sid, uint32_t, sid->num_auths+1);
+ sid->sub_auths = talloc_array(sid, uint32_t, sid->num_auths+1);
if (!sid->sub_auths) {
return NULL;
}
diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c
index 509ec1f343..bbfee31fbe 100644
--- a/source4/libcli/security/security_descriptor.c
+++ b/source4/libcli/security/security_descriptor.c
@@ -30,7 +30,7 @@ struct security_descriptor *security_descriptor_initialise(TALLOC_CTX *mem_ctx)
{
struct security_descriptor *sd;
- sd = talloc_p(mem_ctx, struct security_descriptor);
+ sd = talloc(mem_ctx, struct security_descriptor);
if (!sd) {
return NULL;
}
@@ -72,7 +72,7 @@ NTSTATUS security_descriptor_dacl_add(struct security_descriptor *sd,
const struct security_ace *ace)
{
if (sd->dacl == NULL) {
- sd->dacl = talloc_p(sd, struct security_acl);
+ sd->dacl = talloc(sd, struct security_acl);
if (sd->dacl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -82,7 +82,7 @@ NTSTATUS security_descriptor_dacl_add(struct security_descriptor *sd,
sd->dacl->aces = NULL;
}
- sd->dacl->aces = talloc_realloc_p(sd->dacl, sd->dacl->aces,
+ sd->dacl->aces = talloc_realloc(sd->dacl, sd->dacl->aces,
struct security_ace, sd->dacl->num_aces+1);
if (sd->dacl->aces == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -257,7 +257,7 @@ struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx,
va_start(ap, group_sid);
while ((sidstr = va_arg(ap, const char *))) {
struct dom_sid *sid;
- struct security_ace *ace = talloc_p(sd, struct security_ace);
+ struct security_ace *ace = talloc(sd, struct security_ace);
NTSTATUS status;
if (ace == NULL) {
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index b9baf796df..663c4f28bc 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -31,7 +31,7 @@ struct security_token *security_token_initialise(TALLOC_CTX *mem_ctx)
{
struct security_token *st;
- st = talloc_p(mem_ctx, struct security_token);
+ st = talloc(mem_ctx, struct security_token);
if (!st) {
return NULL;
}
@@ -63,7 +63,7 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
ptoken = security_token_initialise(mem_ctx);
NT_STATUS_HAVE_NO_MEMORY(ptoken);
- ptoken->sids = talloc_array_p(ptoken, struct dom_sid *, n_groupSIDs + 5);
+ ptoken->sids = talloc_array(ptoken, struct dom_sid *, n_groupSIDs + 5);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);
ptoken->user_sid = talloc_reference(ptoken, user_sid);
@@ -163,5 +163,5 @@ void security_token_debug(int dbg_lev, const struct security_token *token)
}
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index de14eb0e57..550450fea7 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -59,7 +59,7 @@ BOOL asn1_push_tag(struct asn1_data *data, uint8_t tag)
struct nesting *nesting;
asn1_write_uint8(data, tag);
- nesting = talloc_p(NULL, struct nesting);
+ nesting = talloc(NULL, struct nesting);
if (!nesting) {
data->has_error = True;
return False;
@@ -349,7 +349,7 @@ BOOL asn1_start_tag(struct asn1_data *data, uint8_t tag)
data->has_error = True;
return False;
}
- nesting = talloc_p(NULL, struct nesting);
+ nesting = talloc(NULL, struct nesting);
if (!nesting) {
data->has_error = True;
return False;
diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index 40991a8855..0c0c64c0b4 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -53,7 +53,7 @@ static NTSTATUS smblsa_connect(struct smbcli_state *cli)
return NT_STATUS_OK;
}
- lsa = talloc_p(cli, struct smblsa_state);
+ lsa = talloc(cli, struct smblsa_state);
if (lsa == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -217,7 +217,7 @@ NTSTATUS smblsa_lookup_sid(struct smbcli_state *cli,
names.names = NULL;
sids.num_sids = 1;
- sids.sids = talloc_p(mem_ctx2, struct lsa_SidPtr);
+ sids.sids = talloc(mem_ctx2, struct lsa_SidPtr);
sids.sids[0].sid = sid;
r.in.handle = &cli->lsa->handle;
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index bd2aae3db1..7e2890272c 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -344,7 +344,7 @@ static DATA_BLOB NTLMv2_generate_response(const uint8_t ntlm_v2_hash[16],
memcpy(final_response.data+sizeof(ntlmv2_response),
ntlmv2_client_data.data, ntlmv2_client_data.length);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return final_response;
}
diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c
index 1462a63dd2..56b55426c0 100644
--- a/source4/libnet/libnet.c
+++ b/source4/libnet/libnet.c
@@ -28,7 +28,7 @@ struct libnet_context *libnet_context_init(void)
mem_ctx = talloc_init("libnet_context");
- ctx = talloc_p(mem_ctx, struct libnet_context);
+ ctx = talloc(mem_ctx, struct libnet_context);
if (!ctx) {
return NULL;
}
@@ -40,7 +40,7 @@ struct libnet_context *libnet_context_init(void)
void libnet_context_destroy(struct libnet_context **libnetctx)
{
- talloc_destroy((*libnetctx)->mem_ctx);
+ talloc_free((*libnetctx)->mem_ctx);
(*libnetctx) = NULL;
}
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 6d1003078d..bf8524c495 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -170,7 +170,7 @@ static NTSTATUS libnet_JoinDomain_samr(struct libnet_context *ctx,
/* prepare samr_LookupNames */
ln.in.domain_handle = &d_handle;
ln.in.num_names = 1;
- ln.in.names = talloc_array_p(mem_ctx, struct samr_String, 1);
+ ln.in.names = talloc_array(mem_ctx, struct samr_String, 1);
if (!ln.in.names) {
r->samr.out.error_string = "Out of Memory";
return NT_STATUS_NO_MEMORY;
diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c
index 20be3a9dce..fb75f0eaaf 100644
--- a/source4/libnet/libnet_passwd.c
+++ b/source4/libnet/libnet_passwd.c
@@ -578,7 +578,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX *
/* prepare samr_LookupNames */
ln.in.domain_handle = &d_handle;
ln.in.num_names = 1;
- ln.in.names = talloc_array_p(mem_ctx, struct samr_String, 1);
+ ln.in.names = talloc_array(mem_ctx, struct samr_String, 1);
if (!ln.in.names) {
r->samr.out.error_string = "Out of Memory";
return NT_STATUS_NO_MEMORY;
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 8a25e27cc1..6947cc8ee6 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -48,7 +48,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
struct ndr_pull *ndr;
- ndr = talloc_zero_p(mem_ctx, struct ndr_pull);
+ ndr = talloc_zero(mem_ctx, struct ndr_pull);
if (!ndr) return NULL;
ndr->data = blob->data;
@@ -121,14 +121,14 @@ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
{
struct ndr_push *ndr;
- ndr = talloc_zero_p(mem_ctx, struct ndr_push);
+ ndr = talloc_zero(mem_ctx, struct ndr_push);
if (!ndr) {
return NULL;
}
ndr->flags = 0;
ndr->alloc_size = NDR_BASE_MARSHALL_SIZE;
- ndr->data = talloc_array_p(ndr, uint8_t, ndr->alloc_size);
+ ndr->data = talloc_array(ndr, uint8_t, ndr->alloc_size);
if (!ndr->data) {
return NULL;
}
@@ -315,7 +315,7 @@ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
{
struct ndr_print *ndr;
- ndr = talloc_p(NULL, struct ndr_print);
+ ndr = talloc(NULL, struct ndr_print);
if (!ndr) return;
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
@@ -332,7 +332,7 @@ void ndr_print_union_debug(ndr_print_union_fn_t fn, const char *name, uint32_t l
{
struct ndr_print *ndr;
- ndr = talloc_p(NULL, struct ndr_print);
+ ndr = talloc(NULL, struct ndr_print);
if (!ndr) return;
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
@@ -348,7 +348,7 @@ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int fla
{
struct ndr_print *ndr;
- ndr = talloc_p(NULL, struct ndr_print);
+ ndr = talloc(NULL, struct ndr_print);
if (!ndr) return;
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
@@ -639,7 +639,7 @@ static NTSTATUS ndr_token_store(TALLOC_CTX *mem_ctx,
uint32_t value)
{
struct ndr_token_list *tok;
- tok = talloc_p(mem_ctx, struct ndr_token_list);
+ tok = talloc(mem_ctx, struct ndr_token_list);
if (tok == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/librpc/ndr/ndr_dcom.c b/source4/librpc/ndr/ndr_dcom.c
index ee077dfd4f..71a43a8fff 100644
--- a/source4/librpc/ndr/ndr_dcom.c
+++ b/source4/librpc/ndr/ndr_dcom.c
@@ -37,7 +37,7 @@ NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DU
NDR_CHECK(ndr_pull_uint16(ndr, &num_entries));
NDR_CHECK(ndr_pull_uint16(ndr, &security_offset));
- ar->stringbindings = talloc_array_p(ndr, struct STRINGBINDING *, num_entries);
+ ar->stringbindings = talloc_array(ndr, struct STRINGBINDING *, num_entries);
ar->stringbindings[0] = NULL;
do {
@@ -46,8 +46,8 @@ NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DU
if (towerid > 0) {
ndr->offset -= 2;
- ar->stringbindings = talloc_realloc_p(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
- ar->stringbindings[towernum] = talloc_p(ndr, struct STRINGBINDING);
+ ar->stringbindings = talloc_realloc(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
+ ar->stringbindings[towernum] = talloc(ndr, struct STRINGBINDING);
NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
towernum++;
}
@@ -56,7 +56,7 @@ NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DU
ar->stringbindings[towernum] = NULL;
towernum = 0;
- ar->securitybindings = talloc_array_p(ndr, struct SECURITYBINDING *, num_entries);
+ ar->securitybindings = talloc_array(ndr, struct SECURITYBINDING *, num_entries);
ar->securitybindings[0] = NULL;
do {
@@ -65,8 +65,8 @@ NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DU
if (towerid > 0) {
ndr->offset -= 2;
- ar->securitybindings = talloc_realloc_p(ndr, ar->securitybindings, struct SECURITYBINDING *, towernum+2);
- ar->securitybindings[towernum] = talloc_p(ndr, struct SECURITYBINDING);
+ ar->securitybindings = talloc_realloc(ndr, ar->securitybindings, struct SECURITYBINDING *, towernum+2);
+ ar->securitybindings[towernum] = talloc(ndr, struct SECURITYBINDING);
NDR_CHECK(ndr_pull_SECURITYBINDING(ndr, ndr_flags, ar->securitybindings[towernum]));
towernum++;
}
@@ -126,7 +126,7 @@ NTSTATUS ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRING
NDR_CHECK(ndr_pull_uint16(ndr, &num_entries));
- ar->stringbindings = talloc_array_p(ndr, struct STRINGBINDING *, 1);
+ ar->stringbindings = talloc_array(ndr, struct STRINGBINDING *, 1);
ar->stringbindings[0] = NULL;
do {
@@ -135,8 +135,8 @@ NTSTATUS ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRING
if (towerid > 0) {
ndr->offset -= 2;
- ar->stringbindings = talloc_realloc_p(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
- ar->stringbindings[towernum] = talloc_p(ndr, struct STRINGBINDING);
+ ar->stringbindings = talloc_realloc(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
+ ar->stringbindings[towernum] = talloc(ndr, struct STRINGBINDING);
NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
towernum++;
}
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index e133c77d07..bdf9cb2581 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -33,7 +33,7 @@ static struct dcerpc_interface_list *dcerpc_pipes = NULL;
*/
NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interface)
{
- struct dcerpc_interface_list *l = talloc_p(talloc_autofree_context(),
+ struct dcerpc_interface_list *l = talloc(talloc_autofree_context(),
struct dcerpc_interface_list);
if (idl_iface_by_name (interface->name) != NULL) {
@@ -96,7 +96,7 @@ struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx)
{
struct dcerpc_pipe *p;
- p = talloc_p(mem_ctx, struct dcerpc_pipe);
+ p = talloc(mem_ctx, struct dcerpc_pipe);
if (!p) {
return NULL;
}
@@ -534,7 +534,7 @@ static NTSTATUS full_request(struct dcerpc_connection *c,
DATA_BLOB *request_blob,
DATA_BLOB *reply_blob)
{
- struct full_request_state *state = talloc_p(mem_ctx, struct full_request_state);
+ struct full_request_state *state = talloc(mem_ctx, struct full_request_state);
NTSTATUS status;
if (state == NULL) {
@@ -864,7 +864,7 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
p->conn->transport.recv_data = dcerpc_request_recv_data;
- req = talloc_p(mem_ctx, struct rpc_request);
+ req = talloc(mem_ctx, struct rpc_request);
if (req == NULL) {
return NULL;
}
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 0e218c478f..7cd2d1654f 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -227,7 +227,7 @@ static NTSTATUS dcerpc_schannel_update(struct gensec_security *gensec_security,
NTSTATUS dcerpc_schannel_session_info(struct gensec_security *gensec_security,
struct auth_session_info **session_info)
{
- (*session_info) = talloc_p(gensec_security, struct auth_session_info);
+ (*session_info) = talloc(gensec_security, struct auth_session_info);
NT_STATUS_HAVE_NO_MEMORY(*session_info);
ZERO_STRUCTP(*session_info);
@@ -271,7 +271,7 @@ static NTSTATUS dcerpc_schannel_start(struct gensec_security *gensec_security)
{
struct dcerpc_schannel_state *dce_schan_state;
- dce_schan_state = talloc_p(gensec_security, struct dcerpc_schannel_state);
+ dce_schan_state = talloc(gensec_security, struct dcerpc_schannel_state);
if (!dce_schan_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -470,7 +470,7 @@ NTSTATUS dcerpc_bind_auth_schannel(struct dcerpc_pipe *p,
NTSTATUS status;
int chan_type = 0;
struct creds_CredentialState *creds;
- creds = talloc_p(p, struct creds_CredentialState);
+ creds = talloc(p, struct creds_CredentialState);
if (!creds) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 14e9fe3a9c..8d049ad967 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -123,7 +123,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
struct smb_read_state *state;
struct smbcli_request *req;
- state = talloc_p(smb, struct smb_read_state);
+ state = talloc(smb, struct smb_read_state);
if (state == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -144,7 +144,7 @@ static NTSTATUS send_read_request_continue(struct dcerpc_connection *c, DATA_BLO
memcpy(state->data.data, blob->data, blob->length);
}
- state->io = talloc_p(state, union smb_read);
+ state->io = talloc(state, union smb_read);
io = state->io;
io->generic.level = RAW_READ_READX;
@@ -222,13 +222,13 @@ static NTSTATUS smb_send_trans_request(struct dcerpc_connection *c, DATA_BLOB *b
uint16 setup[2];
struct smb_trans_state *state;
- state = talloc_p(smb, struct smb_trans_state);
+ state = talloc(smb, struct smb_trans_state);
if (state == NULL) {
return NT_STATUS_NO_MEMORY;
}
state->c = c;
- state->trans = talloc_p(state, struct smb_trans2);
+ state->trans = talloc(state, struct smb_trans2);
trans = state->trans;
trans->in.data = *blob;
@@ -418,7 +418,7 @@ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_connection *c,
/* Over-ride the default session key with the SMB session key */
c->security_state.session_key = smb_session_key;
- smb = talloc_p(c, struct smb_private);
+ smb = talloc(c, struct smb_private);
if (smb == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index a01832764d..9fae7232ec 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -237,7 +237,7 @@ static NTSTATUS sock_send_request(struct dcerpc_connection *p, DATA_BLOB *data,
return NT_STATUS_CONNECTION_DISCONNECTED;
}
- blob = talloc_p(sock, struct sock_blob);
+ blob = talloc(sock, struct sock_blob);
if (blob == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -302,7 +302,7 @@ static NTSTATUS dcerpc_pipe_open_socket(struct dcerpc_connection *c,
struct fd_event fde;
NTSTATUS status;
- sock = talloc_p(c, struct sock_private);
+ sock = talloc(c, struct sock_private);
if (!sock) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 7307b44cb8..a05ad7c897 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -324,7 +324,7 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
comma_count = count_chars(options, ',');
- b->options = talloc_array_p(mem_ctx, const char *, comma_count+2);
+ b->options = talloc_array(mem_ctx, const char *, comma_count+2);
if (!b->options) {
return NT_STATUS_NO_MEMORY;
}
@@ -631,7 +631,7 @@ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *
}
tower->num_floors = 2 + num_protocols;
- tower->floors = talloc_array_p(mem_ctx, struct epm_floor, tower->num_floors);
+ tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
/* Floor 0 */
tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index cf6caebc76..7ac687dd46 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -201,7 +201,7 @@ static void async_simple(struct smbcli_request *c_req)
if (!c_req) return NT_STATUS_UNSUCCESSFUL; \
{ \
struct async_info *async; \
- async = talloc_p(req, struct async_info); \
+ async = talloc(req, struct async_info); \
if (!async) return NT_STATUS_NO_MEMORY; \
async->parms = io; \
async->req = req; \
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 7b351f77b0..f51e3d0694 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -78,7 +78,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
char *path;
struct brl_context *brl;
- brl = talloc_p(mem_ctx, struct brl_context);
+ brl = talloc(mem_ctx, struct brl_context);
if (brl == NULL) {
return NULL;
}
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index 57beba8c68..0aa257073d 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -84,7 +84,7 @@ struct odb_context *odb_init(TALLOC_CTX *mem_ctx, servid_t server,
char *path;
struct odb_context *odb;
- odb = talloc_p(mem_ctx, struct odb_context);
+ odb = talloc(mem_ctx, struct odb_context);
if (odb == NULL) {
return NULL;
}
@@ -124,7 +124,7 @@ struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx,
{
struct odb_lock *lck;
- lck = talloc_p(mem_ctx, struct odb_lock);
+ lck = talloc(mem_ctx, struct odb_lock);
if (lck == NULL) {
return NULL;
}
diff --git a/source4/ntvfs/common/sidmap.c b/source4/ntvfs/common/sidmap.c
index 3254330c2f..46e02b5da1 100644
--- a/source4/ntvfs/common/sidmap.c
+++ b/source4/ntvfs/common/sidmap.c
@@ -45,7 +45,7 @@ struct sidmap_context {
struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx)
{
struct sidmap_context *sidmap;
- sidmap = talloc_p(mem_ctx, struct sidmap_context);
+ sidmap = talloc(mem_ctx, struct sidmap_context);
if (sidmap == NULL) {
return NULL;
}
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index aedb7acaef..a61dbcb852 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -77,7 +77,7 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
{
struct rap_call *call;
- call = talloc_p(mem_ctx, struct rap_call);
+ call = talloc(mem_ctx, struct rap_call);
if (call == NULL)
return NULL;
@@ -92,7 +92,7 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx);
call->ndr_pull_data->flags = RAPNDR_FLAGS;
- call->heap = talloc_p(mem_ctx, struct rap_string_heap);
+ call->heap = talloc(mem_ctx, struct rap_string_heap);
if (call->heap == NULL)
return NULL;
@@ -179,7 +179,7 @@ static NTSTATUS rap_push_string(struct ndr_push *data_push,
NDR_CHECK(ndr_push_uint16(data_push, heap->offset));
NDR_CHECK(ndr_push_uint16(data_push, 0));
- heap->strings = talloc_realloc_p(heap->mem_ctx,
+ heap->strings = talloc_realloc(heap->mem_ctx,
heap->strings,
const char *,
heap->num_strings + 1);
diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c
index 4875592ad6..c69ba2d168 100644
--- a/source4/ntvfs/ipc/rap_server.c
+++ b/source4/ntvfs/ipc/rap_server.c
@@ -32,7 +32,7 @@ NTSTATUS rap_netshareenum(struct smbsrv_request *req,
int i;
r->out.status = 0;
r->out.available = dcesrv_common_get_count_of_shares(req, NULL);
- r->out.info = talloc_array_p(req,
+ r->out.info = talloc_array(req,
union rap_shareenum_info, r->out.available);
for (i=0;i<r->out.available;i++) {
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index 560f4a646b..a1f03da367 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -97,7 +97,7 @@ static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
char *logname = NULL;
- nprivates = talloc_p(req->tcon, struct nbench_private);
+ nprivates = talloc(req->tcon, struct nbench_private);
if (!nprivates) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 051e92b19c..9b6c75e5c6 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -79,7 +79,7 @@ static NTSTATUS ntvfs_map_async_setup(struct smbsrv_request *req,
second_stage_t fn)
{
struct ntvfs_map_async *m;
- m = talloc_p(req, struct ntvfs_map_async);
+ m = talloc(req, struct ntvfs_map_async);
if (m == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -217,7 +217,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
if (write_time != 0) {
- sf = talloc_p(req, union smb_setfileinfo);
+ sf = talloc(req, union smb_setfileinfo);
sf->generic.level = RAW_SFILEINFO_STANDARD;
sf->generic.file.fnum = io2->generic.out.fnum;
sf->standard.in.create_time = 0;
@@ -227,7 +227,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req,
}
if (set_size != 0) {
- sf = talloc_p(req, union smb_setfileinfo);
+ sf = talloc(req, union smb_setfileinfo);
sf->generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
sf->generic.file.fnum = io2->generic.out.fnum;
sf->end_of_file_info.in.size = set_size;
@@ -351,7 +351,7 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
NTSTATUS status;
union smb_open *io2;
- io2 = talloc_zero_p(req, union smb_open);
+ io2 = talloc_zero(req, union smb_open);
if (io2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -417,7 +417,7 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io,
io2->generic.in.file_attr = io->t2open.in.file_attrs;
io2->generic.in.fname = io->t2open.in.fname;
- io2->generic.in.ea_list = talloc_p(io2, struct smb_ea_list);
+ io2->generic.in.ea_list = talloc(io2, struct smb_ea_list);
io2->generic.in.ea_list->num_eas = io->t2open.in.num_eas;
io2->generic.in.ea_list->eas = io->t2open.in.eas;
@@ -485,7 +485,7 @@ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs,
NTSTATUS status;
union smb_fsinfo *fs2;
- fs2 = talloc_p(req, union smb_fsinfo);
+ fs2 = talloc(req, union smb_fsinfo);
if (fs2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -714,7 +714,7 @@ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info
info->stream_info.out.num_streams = info2->generic.out.num_streams;
if (info->stream_info.out.num_streams > 0) {
info->stream_info.out.streams =
- talloc_array_p(req,
+ talloc_array(req,
struct stream_struct,
info->stream_info.out.num_streams);
if (!info->stream_info.out.streams) {
@@ -753,7 +753,7 @@ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info
case RAW_FILEINFO_ALL_EAS:
info->all_eas.out.num_eas = info2->generic.out.num_eas;
if (info->all_eas.out.num_eas > 0) {
- info->all_eas.out.eas = talloc_array_p(req,
+ info->all_eas.out.eas = talloc_array(req,
struct ea_struct,
info->all_eas.out.num_eas);
if (!info->all_eas.out.eas) {
@@ -840,7 +840,7 @@ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *inf
NTSTATUS status;
union smb_fileinfo *info2;
- info2 = talloc_p(req, union smb_fileinfo);
+ info2 = talloc(req, union smb_fileinfo);
if (info2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -869,7 +869,7 @@ NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *inf
NTSTATUS status;
union smb_fileinfo *info2;
- info2 = talloc_p(req, union smb_fileinfo);
+ info2 = talloc(req, union smb_fileinfo);
if (info2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -902,12 +902,12 @@ NTSTATUS ntvfs_map_lock(struct smbsrv_request *req, union smb_lock *lck,
union smb_lock *lck2;
struct smb_lock_entry *locks;
- lck2 = talloc_p(req, union smb_lock);
+ lck2 = talloc(req, union smb_lock);
if (lck2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
- locks = talloc_array_p(lck2, struct smb_lock_entry, 1);
+ locks = talloc_array(lck2, struct smb_lock_entry, 1);
if (locks == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -966,7 +966,7 @@ static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req,
case RAW_WRITE_WRITEUNLOCK:
wr->writeunlock.out.nwritten = wr2->generic.out.nwritten;
- lck = talloc_p(wr2, union smb_lock);
+ lck = talloc(wr2, union smb_lock);
if (lck == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -988,7 +988,7 @@ static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req,
case RAW_WRITE_WRITECLOSE:
wr->writeclose.out.nwritten = wr2->generic.out.nwritten;
- cl = talloc_p(wr2, union smb_close);
+ cl = talloc(wr2, union smb_close);
if (cl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1025,7 +1025,7 @@ NTSTATUS ntvfs_map_write(struct smbsrv_request *req, union smb_write *wr,
union smb_write *wr2;
NTSTATUS status;
- wr2 = talloc_p(req, union smb_write);
+ wr2 = talloc(req, union smb_write);
if (wr2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1125,7 +1125,7 @@ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd,
NTSTATUS status;
uint_t state;
- rd2 = talloc_p(req, union smb_read);
+ rd2 = talloc(req, union smb_read);
if (rd2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1168,7 +1168,7 @@ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd,
state = req->async_states->state;
req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC;
- lck = talloc_p(rd2, union smb_lock);
+ lck = talloc(rd2, union smb_lock);
if (lck == NULL) {
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -1206,7 +1206,7 @@ NTSTATUS ntvfs_map_close(struct smbsrv_request *req, union smb_close *cl,
{
union smb_close *cl2;
- cl2 = talloc_p(req, union smb_close);
+ cl2 = talloc(req, union smb_close);
if (cl2 == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c
index 41e1b04d49..e360321882 100644
--- a/source4/ntvfs/ntvfs_util.c
+++ b/source4/ntvfs/ntvfs_util.c
@@ -33,7 +33,7 @@ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req,
{
struct ntvfs_async_state *async;
- async = talloc_p(req, struct ntvfs_async_state);
+ async = talloc(req, struct ntvfs_async_state);
if (!async) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index e38f2c9ecb..c2856ad292 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -195,7 +195,7 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
uid_t uid = -1;
gid_t gid = -1;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -289,7 +289,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs,
NTSTATUS status;
struct security_descriptor *sd;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -367,7 +367,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
NTSTATUS status;
struct security_descriptor *sd;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -595,7 +595,7 @@ NTSTATUS pvfs_acl_inherit(struct pvfs_state *pvfs,
return status;
}
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c
index c2e8f826a2..1b60f17462 100644
--- a/source4/ntvfs/posix/pvfs_dirlist.c
+++ b/source4/ntvfs/posix/pvfs_dirlist.c
@@ -97,7 +97,7 @@ NTSTATUS pvfs_list_start(struct pvfs_state *pvfs, struct pvfs_filename *name,
char *pattern;
struct pvfs_dir *dir;
- (*dirp) = talloc_zero_p(mem_ctx, struct pvfs_dir);
+ (*dirp) = talloc_zero(mem_ctx, struct pvfs_dir);
if (*dirp == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index 74ee48ba15..6ad654f505 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -296,7 +296,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
if (lck->lockx.in.timeout != 0 &&
(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
- pending = talloc_p(f, struct pvfs_pending_lock);
+ pending = talloc(f, struct pvfs_pending_lock);
if (pending == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index b34d75d24d..ae8841e7b5 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -180,12 +180,12 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
return NT_STATUS_INVALID_PARAMETER;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -468,12 +468,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
flags = O_RDONLY;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -805,7 +805,7 @@ static NTSTATUS pvfs_open_setup_retry(struct ntvfs_module_context *ntvfs,
}
}
- r = talloc_p(req, struct pvfs_open_retry);
+ r = talloc(req, struct pvfs_open_retry);
if (r == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -962,12 +962,12 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
return status;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index 463574c8cf..4b6afac00a 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -64,14 +64,14 @@ NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
int i;
- struct xattr_DosEAs *ealist = talloc_p(mem_ctx, struct xattr_DosEAs);
+ struct xattr_DosEAs *ealist = talloc(mem_ctx, struct xattr_DosEAs);
ZERO_STRUCTP(eas);
status = pvfs_doseas_load(pvfs, name, fd, ealist);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- eas->eas = talloc_array_p(mem_ctx, struct ea_struct, num_names);
+ eas->eas = talloc_array(mem_ctx, struct ea_struct, num_names);
if (eas->eas == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -101,14 +101,14 @@ static NTSTATUS pvfs_query_all_eas(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
int i;
- struct xattr_DosEAs *ealist = talloc_p(mem_ctx, struct xattr_DosEAs);
+ struct xattr_DosEAs *ealist = talloc(mem_ctx, struct xattr_DosEAs);
ZERO_STRUCTP(eas);
status = pvfs_doseas_load(pvfs, name, fd, ealist);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- eas->eas = talloc_array_p(mem_ctx, struct ea_struct, ealist->num_eas);
+ eas->eas = talloc_array(mem_ctx, struct ea_struct, ealist->num_eas);
if (eas->eas == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index fc1576b955..fc899c5fbc 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -75,7 +75,7 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, struct pvfs_filename *
}
}
- components = talloc_array_p(name, char *, num_components);
+ components = talloc_array(name, char *, num_components);
p = name->full_name + strlen(pvfs->base_directory);
*p++ = 0;
@@ -345,7 +345,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t
if (c == '\\') num_components++;
}
- components = talloc_array_p(s, char *, num_components+1);
+ components = talloc_array(s, char *, num_components+1);
if (components == NULL) {
talloc_free(s);
return NT_STATUS_NO_MEMORY;
@@ -450,7 +450,7 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -511,7 +511,7 @@ NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -591,7 +591,7 @@ NTSTATUS pvfs_resolve_parent(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
NTSTATUS status;
char *p;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index 2106758784..76c1996ec7 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -244,7 +244,7 @@ static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
name = pvfs_list_next(dir, &search->current_index);
if (name == NULL) break;
- file = talloc_p(mem_ctx, union smb_search_data);
+ file = talloc(mem_ctx, union smb_search_data);
if (!file) {
return NT_STATUS_NO_MEMORY;
}
@@ -334,7 +334,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
/* we initially make search a child of the request, then if we
need to keep it long term we steal it for the private
structure */
- search = talloc_p(req, struct pvfs_search_state);
+ search = talloc(req, struct pvfs_search_state);
if (!search) {
return NT_STATUS_NO_MEMORY;
}
@@ -475,7 +475,7 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
/* we initially make search a child of the request, then if we
need to keep it long term we steal it for the private
structure */
- search = talloc_p(req, struct pvfs_search_state);
+ search = talloc(req, struct pvfs_search_state);
if (!search) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 9934388461..9bc51d1ef4 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -174,7 +174,7 @@ NTSTATUS pvfs_setfileinfo_ea_set(struct pvfs_state *pvfs,
return NT_STATUS_NOT_SUPPORTED;
}
- ealist = talloc_p(name, struct xattr_DosEAs);
+ ealist = talloc(name, struct xattr_DosEAs);
/* load the current list */
status = pvfs_doseas_load(pvfs, name, fd, ealist);
@@ -194,7 +194,7 @@ NTSTATUS pvfs_setfileinfo_ea_set(struct pvfs_state *pvfs,
if (i==ealist->num_eas) {
/* add it */
- ealist->eas = talloc_realloc_p(ealist, ealist->eas,
+ ealist->eas = talloc_realloc(ealist, ealist->eas,
struct xattr_EA,
ealist->num_eas+1);
if (ealist->eas == NULL) {
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index 98cd4a99f6..59a3d34640 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -497,7 +497,7 @@ static char *name_map(struct pvfs_mangle_context *ctx,
/* find the hash for this prefix */
v = hash = mangle_hash(ctx, name, prefix_len);
- new_name = talloc_array_p(ctx, char, 13);
+ new_name = talloc_array(ctx, char, 13);
if (new_name == NULL) {
return NULL;
}
@@ -608,7 +608,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
{
struct pvfs_mangle_context *ctx;
- ctx = talloc_p(pvfs, struct pvfs_mangle_context);
+ ctx = talloc(pvfs, struct pvfs_mangle_context);
if (ctx == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_streams.c b/source4/ntvfs/posix/pvfs_streams.c
index e92732b810..c9f2fcae29 100644
--- a/source4/ntvfs/posix/pvfs_streams.c
+++ b/source4/ntvfs/posix/pvfs_streams.c
@@ -38,7 +38,7 @@ NTSTATUS pvfs_stream_information(struct pvfs_state *pvfs,
int i;
NTSTATUS status;
- streams = talloc_p(mem_ctx, struct xattr_DosStreams);
+ streams = talloc(mem_ctx, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -49,7 +49,7 @@ NTSTATUS pvfs_stream_information(struct pvfs_state *pvfs,
}
info->num_streams = streams->num_streams+1;
- info->streams = talloc_array_p(mem_ctx, struct stream_struct, info->num_streams);
+ info->streams = talloc_array(mem_ctx, struct stream_struct, info->num_streams);
if (!info->streams) {
return NT_STATUS_NO_MEMORY;
}
@@ -85,7 +85,7 @@ NTSTATUS pvfs_stream_info(struct pvfs_state *pvfs, struct pvfs_filename *name, i
return NT_STATUS_OK;
}
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -127,7 +127,7 @@ static NTSTATUS pvfs_stream_update_size(struct pvfs_state *pvfs, struct pvfs_fil
int i;
NTSTATUS status;
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -148,7 +148,7 @@ static NTSTATUS pvfs_stream_update_size(struct pvfs_state *pvfs, struct pvfs_fil
if (i == streams->num_streams) {
struct xattr_DosStream *s;
- streams->streams = talloc_realloc_p(streams, streams->streams,
+ streams->streams = talloc_realloc(streams, streams->streams,
struct xattr_DosStream,
streams->num_streams+1);
if (streams->streams == NULL) {
@@ -204,7 +204,7 @@ NTSTATUS pvfs_stream_delete(struct pvfs_state *pvfs,
return status;
}
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index da36ac2239..c8d696f0fc 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -126,7 +126,7 @@ static int pvfs_wait_destructor(void *ptr)
struct timed_event te;
struct pvfs_wait *pwait;
- pwait = talloc_p(pvfs, struct pvfs_wait);
+ pwait = talloc(pvfs, struct pvfs_wait);
if (pwait == NULL) {
return NULL;
}
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 0b642adb01..314f9736a3 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -104,7 +104,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
char *base_directory;
NTSTATUS status;
- pvfs = talloc_zero_p(tcon, struct pvfs_state);
+ pvfs = talloc_zero(tcon, struct pvfs_state);
if (pvfs == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/xattr_tdb.c b/source4/ntvfs/posix/xattr_tdb.c
index eebae38ab7..0184244aa8 100644
--- a/source4/ntvfs/posix/xattr_tdb.c
+++ b/source4/ntvfs/posix/xattr_tdb.c
@@ -59,7 +59,7 @@ static NTSTATUS xattr_tdb_add_list(struct pvfs_state *pvfs, const char *attr_nam
len = strlen(attr_name) + 1;
- blob.data = talloc_realloc_p(mem_ctx, blob.data, uint8_t, blob.length + len);
+ blob.data = talloc_realloc(mem_ctx, blob.data, uint8_t, blob.length + len);
if (blob.data == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
@@ -94,7 +94,7 @@ static NTSTATUS get_ea_db_key(TALLOC_CTX *mem_ctx,
}
}
- key->dptr = talloc_array_p(mem_ctx, char, 16 + len);
+ key->dptr = talloc_array(mem_ctx, char, 16 + len);
if (key->dptr == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c
index cfe846a828..c44a527458 100644
--- a/source4/ntvfs/simple/svfs_util.c
+++ b/source4/ntvfs/simple/svfs_util.c
@@ -64,7 +64,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req,
uint_t allocated = 0;
char *low_mask;
- dir = talloc_p(mem_ctx, struct svfs_dir);
+ dir = talloc(mem_ctx, struct svfs_dir);
if (!dir) { return NULL; }
dir->count = 0;
@@ -108,7 +108,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req,
if (dir->count >= allocated) {
allocated = (allocated + 100) * 1.2;
- dir->files = talloc_realloc_p(dir, dir->files, struct svfs_dirfile, allocated);
+ dir->files = talloc_realloc(dir, dir->files, struct svfs_dirfile, allocated);
if (!dir->files) {
closedir(odir);
return NULL;
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index 57d626465a..ace0ad896f 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -71,7 +71,7 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs,
struct smbsrv_tcon *tcon = req->tcon;
struct svfs_private *private;
- private = talloc_p(tcon, struct svfs_private);
+ private = talloc(tcon, struct svfs_private);
private->next_search_handle = 0;
private->connectpath = talloc_strdup(tcon, lp_pathname(tcon->service));
@@ -227,7 +227,7 @@ static NTSTATUS svfs_map_fileinfo(struct ntvfs_module_context *ntvfs,
info->generic.out.num_streams = 0;
/* setup a single data stream */
info->generic.out.num_streams = 1 + (dir?dir->count:0);
- info->generic.out.streams = talloc_array_p(req,
+ info->generic.out.streams = talloc_array(req,
struct stream_struct,
info->generic.out.num_streams);
if (!info->generic.out.streams) {
@@ -380,7 +380,7 @@ do_open:
return map_nt_error_from_unix(errno);
}
- f = talloc_p(req->tcon, struct svfs_file);
+ f = talloc(req->tcon, struct svfs_file);
f->fd = fd;
f->name = talloc_strdup(req->tcon, unix_path);
@@ -787,7 +787,7 @@ static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NOT_SUPPORTED;
}
- search = talloc_zero_p(private, struct search_state);
+ search = talloc_zero(private, struct search_state);
if (!search) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index a1a5244453..9915660d9b 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -46,7 +46,7 @@ struct unix_sec_ctx {
*/
static struct unix_sec_ctx *save_unix_security(TALLOC_CTX *mem_ctx)
{
- struct unix_sec_ctx *sec = talloc_p(mem_ctx, struct unix_sec_ctx);
+ struct unix_sec_ctx *sec = talloc(mem_ctx, struct unix_sec_ctx);
if (sec == NULL) {
return NULL;
}
@@ -57,7 +57,7 @@ static struct unix_sec_ctx *save_unix_security(TALLOC_CTX *mem_ctx)
talloc_free(sec);
return NULL;
}
- sec->groups = talloc_array_p(sec, gid_t, sec->ngroups);
+ sec->groups = talloc_array(sec, gid_t, sec->ngroups);
if (sec->groups == NULL) {
talloc_free(sec);
return NULL;
@@ -101,7 +101,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs,
struct unixuid_private *private = ntvfs->private_data;
int i;
NTSTATUS status;
- *sec = talloc_p(req, struct unix_sec_ctx);
+ *sec = talloc(req, struct unix_sec_ctx);
/* we can't do unix security without a user and group */
if (token->num_sids < 2) {
@@ -121,7 +121,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs,
}
(*sec)->ngroups = token->num_sids - 2;
- (*sec)->groups = talloc_array_p(*sec, gid_t, (*sec)->ngroups);
+ (*sec)->groups = talloc_array(*sec, gid_t, (*sec)->ngroups);
if ((*sec)->groups == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -208,7 +208,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs,
struct unixuid_private *private;
NTSTATUS status;
- private = talloc_p(req->tcon, struct unixuid_private);
+ private = talloc(req->tcon, struct unixuid_private);
if (!private) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 0582d55511..8380fccaf7 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -1088,7 +1088,7 @@ static const char *lp_string(const char *s)
if (!lp_talloc)
lp_talloc = talloc_init("lp_talloc");
- ret = talloc_array_p(lp_talloc, char, len + 100); /* leave room for substitution */
+ ret = talloc_array(lp_talloc, char, len + 100); /* leave room for substitution */
if (!ret)
return NULL;
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 40335e4246..575c073e46 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -179,7 +179,7 @@ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
/* check if this endpoint exists
*/
if ((ep=find_endpoint(dce_ctx, &binding))==NULL) {
- ep = talloc_p(dce_ctx, struct dcesrv_endpoint);
+ ep = talloc(dce_ctx, struct dcesrv_endpoint);
if (!ep) {
return NT_STATUS_NO_MEMORY;
}
@@ -196,7 +196,7 @@ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
}
/* talloc a new interface list element */
- ifl = talloc_p(dce_ctx, struct dcesrv_if_list);
+ ifl = talloc(dce_ctx, struct dcesrv_if_list);
if (!ifl) {
return NT_STATUS_NO_MEMORY;
}
@@ -396,7 +396,7 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code
pkt.u.fault.cancel_count = 0;
pkt.u.fault.status = fault_code;
- rep = talloc_p(call, struct dcesrv_call_reply);
+ rep = talloc(call, struct dcesrv_call_reply);
if (!rep) {
return NT_STATUS_NO_MEMORY;
}
@@ -433,7 +433,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason)
pkt.u.bind_nak.reject_reason = reason;
pkt.u.bind_nak.num_versions = 0;
- rep = talloc_p(call, struct dcesrv_call_reply);
+ rep = talloc(call, struct dcesrv_call_reply);
if (!rep) {
return NT_STATUS_NO_MEMORY;
}
@@ -544,7 +544,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
pkt.u.bind_ack.secondary_address = "";
}
pkt.u.bind_ack.num_results = 1;
- pkt.u.bind_ack.ctx_list = talloc_p(call, struct dcerpc_ack_ctx);
+ pkt.u.bind_ack.ctx_list = talloc(call, struct dcerpc_ack_ctx);
if (!pkt.u.bind_ack.ctx_list) {
return NT_STATUS_NO_MEMORY;
}
@@ -709,7 +709,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call)
return dcesrv_bind_nak(call, 0);
}
- rep = talloc_p(call, struct dcesrv_call_reply);
+ rep = talloc(call, struct dcesrv_call_reply);
if (!rep) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index 561482a5fe..222f513bb9 100644
--- a/source4/rpc_server/dcerpc_sock.c
+++ b/source4/rpc_server/dcerpc_sock.c
@@ -66,9 +66,9 @@ static void add_socket_rpc_unix(struct server_service *service, struct dcesrv_en
return;
}
- dcesrv_sock = talloc_p(stream_socket, struct dcesrv_socket_context);
+ dcesrv_sock = talloc(stream_socket, struct dcesrv_socket_context);
if (!dcesrv_sock) {
- DEBUG(0,("talloc_p(stream_socket, struct dcesrv_socket_context) failed\n"));
+ DEBUG(0,("talloc(stream_socket, struct dcesrv_socket_context) failed\n"));
return;
}
@@ -102,9 +102,9 @@ static void add_socket_rpc_ncalrpc(struct server_service *service, struct dcesrv
return;
}
- dcesrv_sock = talloc_p(stream_socket, struct dcesrv_socket_context);
+ dcesrv_sock = talloc(stream_socket, struct dcesrv_socket_context);
if (!dcesrv_sock) {
- DEBUG(0,("talloc_p(stream_socket, struct dcesrv_socket_context) failed\n"));
+ DEBUG(0,("talloc(stream_socket, struct dcesrv_socket_context) failed\n"));
return;
}
@@ -143,9 +143,9 @@ static void add_socket_rpc_tcp_iface(struct server_service *service,
e->ep_description.endpoint = talloc_asprintf(dce_ctx, "%d", port);
}
- dcesrv_sock = talloc_p(stream_socket, struct dcesrv_socket_context);
+ dcesrv_sock = talloc(stream_socket, struct dcesrv_socket_context);
if (!dcesrv_sock) {
- DEBUG(0,("talloc_p(stream_socket, struct dcesrv_socket_context) failed\n"));
+ DEBUG(0,("talloc(stream_socket, struct dcesrv_socket_context) failed\n"));
return;
}
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index 62c879408f..f1cd916dcb 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -84,7 +84,7 @@ BOOL dcesrv_auth_bind(struct dcesrv_call_state *call)
return True;
}
- dce_conn->auth_state.auth_info = talloc_p(dce_conn, struct dcerpc_auth);
+ dce_conn->auth_state.auth_info = talloc(dce_conn, struct dcerpc_auth);
if (!dce_conn->auth_state.auth_info) {
return False;
}
@@ -214,7 +214,7 @@ BOOL dcesrv_auth_alter(struct dcesrv_call_state *call)
return False;
}
- dce_conn->auth_state.auth_info = talloc_p(dce_conn, struct dcerpc_auth);
+ dce_conn->auth_state.auth_info = talloc(dce_conn, struct dcerpc_auth);
if (!dce_conn->auth_state.auth_info) {
return False;
}
diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c
index 30e508d65b..506417d7e4 100644
--- a/source4/rpc_server/dcom/remact.c
+++ b/source4/rpc_server/dcom/remact.c
@@ -55,8 +55,8 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
/* FIXME: Loop thru given interfaces and set r->out.results and
* r->out.interfaces */
- r->out.ifaces = talloc_array_p(mem_ctx, struct pMInterfacePointer, r->in.Interfaces);
- r->out.results = talloc_array_p(mem_ctx, WERROR, r->in.Interfaces);
+ r->out.ifaces = talloc_array(mem_ctx, struct pMInterfacePointer, r->in.Interfaces);
+ r->out.results = talloc_array(mem_ctx, WERROR, r->in.Interfaces);
r->out.hr = cr->out.result;
for (i = 0; i < r->in.Interfaces; i++) {
diff --git a/source4/rpc_server/dcom/rot.c b/source4/rpc_server/dcom/rot.c
index 04fb7c73a5..f36eaf20d1 100644
--- a/source4/rpc_server/dcom/rot.c
+++ b/source4/rpc_server/dcom/rot.c
@@ -33,7 +33,7 @@ static WERROR rot_add(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -45,7 +45,7 @@ static WERROR rot_remove(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -57,7 +57,7 @@ static WERROR rot_is_listed(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -69,7 +69,7 @@ static WERROR rot_get_interface_pointer(struct dcesrv_call_state *dce_call, TALL
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -81,7 +81,7 @@ static WERROR rot_set_modification_time(struct dcesrv_call_state *dce_call, TALL
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -93,7 +93,7 @@ static WERROR rot_get_modification_time(struct dcesrv_call_state *dce_call, TALL
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
@@ -105,7 +105,7 @@ static WERROR rot_enum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
{
struct tdb_wrap *db = openrodb(mem_ctx);
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
- talloc_destroy(db);
+ talloc_free(db);
}
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index 508a2dec5e..6a1ccb00d5 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -40,7 +40,7 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
r->out.bind_info = NULL;
ZERO_STRUCTP(r->out.bind_handle);
- b_state = talloc_p(dce_call->conn, struct drsuapi_bind_state);
+ b_state = talloc(dce_call->conn, struct drsuapi_bind_state);
WERR_TALLOC_CHECK(b_state);
b_state->sam_ctx = samdb_connect(b_state);
@@ -57,7 +57,7 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
handle->data = talloc_steal(handle, b_state);
- bind_info = talloc_p(mem_ctx, struct drsuapi_DsBindInfoCtr);
+ bind_info = talloc(mem_ctx, struct drsuapi_DsBindInfoCtr);
WERR_TALLOC_CHECK(bind_info);
ZERO_STRUCT(site_guid);
diff --git a/source4/rpc_server/drsuapi/drsuapi_cracknames.c b/source4/rpc_server/drsuapi/drsuapi_cracknames.c
index 2ebdd59cfe..1e77ae020a 100644
--- a/source4/rpc_server/drsuapi/drsuapi_cracknames.c
+++ b/source4/rpc_server/drsuapi/drsuapi_cracknames.c
@@ -253,11 +253,11 @@ WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CT
int count;
int i;
- ctr1 = talloc_p(mem_ctx, struct drsuapi_DsNameCtr1);
+ ctr1 = talloc(mem_ctx, struct drsuapi_DsNameCtr1);
WERR_TALLOC_CHECK(ctr1);
count = r->in.req.req1.count;
- names = talloc_array_p(mem_ctx, struct drsuapi_DsNameInfo1, count);
+ names = talloc_array(mem_ctx, struct drsuapi_DsNameInfo1, count);
WERR_TALLOC_CHECK(names);
for (i=0; i < count; i++) {
diff --git a/source4/rpc_server/dssetup/dcesrv_dssetup.c b/source4/rpc_server/dssetup/dcesrv_dssetup.c
index dd6554b9f7..2be7c684a4 100644
--- a/source4/rpc_server/dssetup/dcesrv_dssetup.c
+++ b/source4/rpc_server/dssetup/dcesrv_dssetup.c
@@ -36,7 +36,7 @@ static WERROR dssetup_DsRoleGetPrimaryDomainInformation(struct dcesrv_call_state
{
union dssetup_DsRoleInfo *info;
- info = talloc_p(mem_ctx, union dssetup_DsRoleInfo);
+ info = talloc(mem_ctx, union dssetup_DsRoleInfo);
W_ERROR_HAVE_NO_MEMORY(info);
switch (r->in.level) {
diff --git a/source4/rpc_server/echo/rpc_echo.c b/source4/rpc_server/echo/rpc_echo.c
index b793cd4da7..009fa1aa6d 100644
--- a/source4/rpc_server/echo/rpc_echo.c
+++ b/source4/rpc_server/echo/rpc_echo.c
@@ -71,7 +71,7 @@ static NTSTATUS echo_TestCall(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS echo_TestCall2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_TestCall2 *r)
{
- r->out.info = talloc_p(mem_ctx, union echo_Info);
+ r->out.info = talloc(mem_ctx, union echo_Info);
if (!r->out.info) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 98992de74a..797dcc624e 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -67,7 +67,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
struct dcerpc_binding description;
for (iface=d->interface_list;iface;iface=iface->next) {
- (*eps) = talloc_realloc_p(mem_ctx,
+ (*eps) = talloc_realloc(mem_ctx,
*eps,
struct dcesrv_ep_iface,
total + 1);
@@ -128,7 +128,7 @@ static error_status_t epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX
if (!eps) {
/* this is the first call - fill the list. Subsequent calls
will feed from this list, stored in the handle */
- eps = talloc_p(h, struct rpc_eps);
+ eps = talloc(h, struct rpc_eps);
if (!eps) {
return EPMAPPER_STATUS_NO_MEMORY;
}
@@ -153,7 +153,7 @@ static error_status_t epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX
return EPMAPPER_STATUS_NO_MORE_ENTRIES;
}
- r->out.entries = talloc_array_p(mem_ctx, struct epm_entry_t, num_ents);
+ r->out.entries = talloc_array(mem_ctx, struct epm_entry_t, num_ents);
if (!r->out.entries) {
return EPMAPPER_STATUS_NO_MEMORY;
}
@@ -161,7 +161,7 @@ static error_status_t epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX
for (i=0;i<num_ents;i++) {
ZERO_STRUCT(r->out.entries[i].object);
r->out.entries[i].annotation = eps->e[i].name;
- r->out.entries[i].tower = talloc_p(mem_ctx, struct epm_twr_t);
+ r->out.entries[i].tower = talloc(mem_ctx, struct epm_twr_t);
if (!r->out.entries[i].tower) {
return EPMAPPER_STATUS_NO_MEMORY;
}
@@ -192,11 +192,11 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
ZERO_STRUCT(*r->out.entry_handle);
r->out.num_towers = 1;
- r->out.towers = talloc_p(mem_ctx, struct epm_twr_p_t);
+ r->out.towers = talloc(mem_ctx, struct epm_twr_p_t);
if (!r->out.towers) {
return EPMAPPER_STATUS_NO_MEMORY;
}
- r->out.towers->twr = talloc_p(mem_ctx, struct epm_twr_t);
+ r->out.towers->twr = talloc(mem_ctx, struct epm_twr_t);
if (!r->out.towers->twr) {
return EPMAPPER_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/handles.c b/source4/rpc_server/handles.c
index df9213bfd3..b203f45e4e 100644
--- a/source4/rpc_server/handles.c
+++ b/source4/rpc_server/handles.c
@@ -47,7 +47,7 @@ struct dcesrv_handle *dcesrv_handle_new(struct dcesrv_connection_context *contex
{
struct dcesrv_handle *h;
- h = talloc_p(context, struct dcesrv_handle);
+ h = talloc(context, struct dcesrv_handle);
if (!h) {
return NULL;
}
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index ff33d52d01..c23bbe94d0 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -166,7 +166,7 @@ static NTSTATUS lsa_EnumPrivs(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
r->out.privs->count < r->in.max_count) {
struct lsa_PrivEntry *e;
- r->out.privs->privs = talloc_realloc_p(r->out.privs,
+ r->out.privs->privs = talloc_realloc(r->out.privs,
r->out.privs->privs,
struct lsa_PrivEntry,
r->out.privs->count+1);
@@ -222,7 +222,7 @@ static NTSTATUS lsa_get_policy_state(struct dcesrv_call_state *dce_call, TALLOC_
struct lsa_policy_state *state;
const char *sid_str;
- state = talloc_p(mem_ctx, struct lsa_policy_state);
+ state = talloc(mem_ctx, struct lsa_policy_state);
if (!state) {
return NT_STATUS_NO_MEMORY;
}
@@ -410,7 +410,7 @@ static NTSTATUS lsa_QueryInfoPolicy2(struct dcesrv_call_state *dce_call, TALLOC_
state = h->data;
- r->out.info = talloc_p(mem_ctx, union lsa_PolicyInformation);
+ r->out.info = talloc(mem_ctx, union lsa_PolicyInformation);
if (!r->out.info) {
return NT_STATUS_NO_MEMORY;
}
@@ -514,7 +514,7 @@ static NTSTATUS lsa_EnumAccounts(struct dcesrv_call_state *dce_call, TALLOC_CTX
return NT_STATUS_NO_MORE_ENTRIES;
}
- r->out.sids->sids = talloc_array_p(r->out.sids, struct lsa_SidPtr, count);
+ r->out.sids->sids = talloc_array(r->out.sids, struct lsa_SidPtr, count);
if (r->out.sids->sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -979,7 +979,7 @@ static NTSTATUS lsa_EnumTrustDom(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
/* convert to lsa_DomainInformation format */
- entries = talloc_array_p(mem_ctx, struct lsa_DomainInformation, count);
+ entries = talloc_array(mem_ctx, struct lsa_DomainInformation, count);
if (!entries) {
return NT_STATUS_NO_MEMORY;
}
@@ -1077,7 +1077,7 @@ static NTSTATUS lsa_authority_list(struct lsa_policy_state *state, TALLOC_CTX *m
}
}
- domains->domains = talloc_realloc_p(domains,
+ domains->domains = talloc_realloc(domains,
domains->domains,
struct lsa_TrustInformation,
domains->count+1);
@@ -1145,19 +1145,19 @@ static NTSTATUS lsa_LookupSids3(struct dcesrv_call_state *dce_call,
return status;
}
- r->out.domains = talloc_zero_p(mem_ctx, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
if (r->out.domains == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.names = talloc_zero_p(mem_ctx, struct lsa_TransNameArray2);
+ r->out.names = talloc_zero(mem_ctx, struct lsa_TransNameArray2);
if (r->out.names == NULL) {
return NT_STATUS_NO_MEMORY;
}
*r->out.count = 0;
- r->out.names->names = talloc_array_p(r->out.names, struct lsa_TranslatedName2,
+ r->out.names->names = talloc_array(r->out.names, struct lsa_TranslatedName2,
r->in.sids->num_sids);
if (r->out.names->names == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1269,12 +1269,12 @@ static NTSTATUS lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
}
r->out.domains = r3.out.domains;
- r->out.names = talloc_p(mem_ctx, struct lsa_TransNameArray);
+ r->out.names = talloc(mem_ctx, struct lsa_TransNameArray);
if (r->out.names == NULL) {
return NT_STATUS_NO_MEMORY;
}
r->out.names->count = r3.out.names->count;
- r->out.names->names = talloc_array_p(r->out.names, struct lsa_TranslatedName,
+ r->out.names->names = talloc_array(r->out.names, struct lsa_TranslatedName,
r->out.names->count);
if (r->out.names->names == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1305,7 +1305,7 @@ static NTSTATUS lsa_OpenAccount(struct dcesrv_call_state *dce_call, TALLOC_CTX *
state = h->data;
- astate = talloc_p(dce_call->conn, struct lsa_account_state);
+ astate = talloc(dce_call->conn, struct lsa_account_state);
if (astate == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1367,7 +1367,7 @@ static NTSTATUS lsa_EnumPrivsAccount(struct dcesrv_call_state *dce_call,
astate = h->data;
- r->out.privs = talloc_p(mem_ctx, struct lsa_PrivilegeSet);
+ r->out.privs = talloc(mem_ctx, struct lsa_PrivilegeSet);
r->out.privs->count = 0;
r->out.privs->unknown = 0;
r->out.privs->set = NULL;
@@ -1383,7 +1383,7 @@ static NTSTATUS lsa_EnumPrivsAccount(struct dcesrv_call_state *dce_call,
return NT_STATUS_OK;
}
- r->out.privs->set = talloc_array_p(r->out.privs,
+ r->out.privs->set = talloc_array(r->out.privs,
struct lsa_LUIDAttribute, el->num_values);
if (r->out.privs->set == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1440,7 +1440,7 @@ static NTSTATUS lsa_EnumAccountRights(struct dcesrv_call_state *dce_call,
}
r->out.rights->count = el->num_values;
- r->out.rights->names = talloc_array_p(r->out.rights,
+ r->out.rights->names = talloc_array(r->out.rights,
struct lsa_String, r->out.rights->count);
if (r->out.rights->names == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1502,7 +1502,7 @@ static NTSTATUS lsa_AddRemoveAccountRights(struct dcesrv_call_state *dce_call,
r2.in.handle = &state->handle->wire_handle;
r2.in.sid = sid;
- r2.out.rights = talloc_p(mem_ctx, struct lsa_RightSet);
+ r2.out.rights = talloc(mem_ctx, struct lsa_RightSet);
status = lsa_EnumAccountRights(dce_call, mem_ctx, &r2);
if (!NT_STATUS_IS_OK(status)) {
@@ -1511,7 +1511,7 @@ static NTSTATUS lsa_AddRemoveAccountRights(struct dcesrv_call_state *dce_call,
}
el.num_values = 0;
- el.values = talloc_array_p(mem_ctx, struct ldb_val, rights->count);
+ el.values = talloc_array(mem_ctx, struct ldb_val, rights->count);
if (el.values == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1571,7 +1571,7 @@ static NTSTATUS lsa_AddPrivilegesToAccount(struct dcesrv_call_state *dce_call, T
astate = h->data;
rights.count = r->in.privs->count;
- rights.names = talloc_array_p(mem_ctx, struct lsa_String, rights.count);
+ rights.names = talloc_array(mem_ctx, struct lsa_String, rights.count);
if (rights.names == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1607,7 +1607,7 @@ static NTSTATUS lsa_RemovePrivilegesFromAccount(struct dcesrv_call_state *dce_ca
astate = h->data;
- rights = talloc_p(mem_ctx, struct lsa_RightSet);
+ rights = talloc(mem_ctx, struct lsa_RightSet);
if (r->in.remove_all == 1 &&
r->in.privs == NULL) {
@@ -1633,7 +1633,7 @@ static NTSTATUS lsa_RemovePrivilegesFromAccount(struct dcesrv_call_state *dce_ca
}
rights->count = r->in.privs->count;
- rights->names = talloc_array_p(mem_ctx, struct lsa_String, rights->count);
+ rights->names = talloc_array(mem_ctx, struct lsa_String, rights->count);
if (rights->names == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2258,7 +2258,7 @@ static NTSTATUS lsa_LookupPrivName(struct dcesrv_call_state *dce_call,
return NT_STATUS_NO_SUCH_PRIVILEGE;
}
- r->out.name = talloc_p(mem_ctx, struct lsa_String);
+ r->out.name = talloc(mem_ctx, struct lsa_String);
if (r->out.name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2288,7 +2288,7 @@ static NTSTATUS lsa_LookupPrivDisplayName(struct dcesrv_call_state *dce_call,
return NT_STATUS_NO_SUCH_PRIVILEGE;
}
- r->out.disp_name = talloc_p(mem_ctx, struct lsa_String);
+ r->out.disp_name = talloc(mem_ctx, struct lsa_String);
if (r->out.disp_name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2345,7 +2345,7 @@ static NTSTATUS lsa_EnumAccountsWithUserRight(struct dcesrv_call_state *dce_call
return NT_STATUS_NO_SUCH_USER;
}
- r->out.sids->sids = talloc_array_p(r->out.sids, struct lsa_SidPtr, ret);
+ r->out.sids->sids = talloc_array(r->out.sids, struct lsa_SidPtr, ret);
if (r->out.sids->sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2464,14 +2464,14 @@ static NTSTATUS lsa_GetUserName(struct dcesrv_call_state *dce_call, TALLOC_CTX *
account_name = talloc_reference(mem_ctx, dce_call->conn->auth_state.session_info->server_info->account_name);
authority_name = talloc_reference(mem_ctx, dce_call->conn->auth_state.session_info->server_info->domain_name);
- _account_name = talloc_p(mem_ctx, struct lsa_String);
+ _account_name = talloc(mem_ctx, struct lsa_String);
NTSTATUS_TALLOC_CHECK(_account_name);
_account_name->string = account_name;
if (r->in.authority_name) {
- _authority_name = talloc_p(mem_ctx, struct lsa_StringPointer);
+ _authority_name = talloc(mem_ctx, struct lsa_StringPointer);
NTSTATUS_TALLOC_CHECK(_authority_name);
- _authority_name->string = talloc_p(mem_ctx, struct lsa_String);
+ _authority_name->string = talloc(mem_ctx, struct lsa_String);
NTSTATUS_TALLOC_CHECK(_authority_name->string);
_authority_name->string->string = authority_name;
}
@@ -2581,19 +2581,19 @@ static NTSTATUS lsa_LookupNames3(struct dcesrv_call_state *dce_call,
state = h->data;
- r->out.domains = talloc_zero_p(mem_ctx, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
if (r->out.domains == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.sids = talloc_zero_p(mem_ctx, struct lsa_TransSidArray3);
+ r->out.sids = talloc_zero(mem_ctx, struct lsa_TransSidArray3);
if (r->out.sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
*r->out.count = 0;
- r->out.sids->sids = talloc_array_p(r->out.sids, struct lsa_TranslatedSid3,
+ r->out.sids->sids = talloc_array(r->out.sids, struct lsa_TranslatedSid3,
r->in.num_names);
if (r->out.sids->sids == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -2657,19 +2657,19 @@ static NTSTATUS lsa_LookupNames2(struct dcesrv_call_state *dce_call,
state = h->data;
- r->out.domains = talloc_zero_p(mem_ctx, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
if (r->out.domains == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.sids = talloc_zero_p(mem_ctx, struct lsa_TransSidArray2);
+ r->out.sids = talloc_zero(mem_ctx, struct lsa_TransSidArray2);
if (r->out.sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
*r->out.count = 0;
- r->out.sids->sids = talloc_array_p(r->out.sids, struct lsa_TranslatedSid2,
+ r->out.sids->sids = talloc_array(r->out.sids, struct lsa_TranslatedSid2,
r->in.num_names);
if (r->out.sids->sids == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -2741,12 +2741,12 @@ static NTSTATUS lsa_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *
}
r->out.domains = r2.out.domains;
- r->out.sids = talloc_p(mem_ctx, struct lsa_TransSidArray);
+ r->out.sids = talloc(mem_ctx, struct lsa_TransSidArray);
if (r->out.sids == NULL) {
return NT_STATUS_NO_MEMORY;
}
r->out.sids->count = r2.out.sids->count;
- r->out.sids->sids = talloc_array_p(r->out.sids, struct lsa_TranslatedSid,
+ r->out.sids->sids = talloc_array(r->out.sids, struct lsa_TranslatedSid,
r->out.sids->count);
if (r->out.sids->sids == NULL) {
return NT_STATUS_NO_MEMORY;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 6ef1c66714..665d778ec9 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -45,7 +45,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call)
struct server_pipe_state *state;
NTSTATUS status;
- state = talloc_p(dce_call->conn, struct server_pipe_state);
+ state = talloc(dce_call->conn, struct server_pipe_state);
if (state == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -112,7 +112,7 @@ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALL
dce_call->context->private = NULL;
}
- pipe_state = talloc_p(dce_call->context, struct server_pipe_state);
+ pipe_state = talloc(dce_call->context, struct server_pipe_state);
if (!pipe_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -213,7 +213,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL
if (pipe_state->creds) {
talloc_free(pipe_state->creds);
}
- pipe_state->creds = talloc_p(pipe_state, struct creds_CredentialState);
+ pipe_state->creds = talloc(pipe_state, struct creds_CredentialState);
if (!pipe_state->creds) {
return NT_STATUS_NO_MEMORY;
}
@@ -963,7 +963,7 @@ static NTSTATUS netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_call, TALL
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- info1 = talloc_p(mem_ctx, struct netr_DomainInfo1);
+ info1 = talloc(mem_ctx, struct netr_DomainInfo1);
if (info1 == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -971,7 +971,7 @@ static NTSTATUS netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_call, TALL
ZERO_STRUCTP(info1);
info1->num_trusts = ret2 + 1;
- info1->trusts = talloc_array_p(mem_ctx, struct netr_DomainTrustInfo,
+ info1->trusts = talloc_array(mem_ctx, struct netr_DomainTrustInfo,
info1->num_trusts);
if (info1->trusts == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -1169,7 +1169,7 @@ static WERROR netr_DrsGetDCNameEx2(struct dcesrv_call_state *dce_call, TALLOC_CT
return WERR_NO_SUCH_DOMAIN;
}
- r->out.info = talloc_p(mem_ctx, struct netr_DrsGetDCNameEx2Info);
+ r->out.info = talloc(mem_ctx, struct netr_DrsGetDCNameEx2Info);
if (!r->out.info) {
return WERR_NOMEM;
}
@@ -1259,7 +1259,7 @@ static WERROR netr_DsrEnumerateDomainTrusts(struct dcesrv_call_state *dce_call,
return WERR_OK;
}
- trusts = talloc_array_p(mem_ctx, struct netr_DomainTrust, ret);
+ trusts = talloc_array(mem_ctx, struct netr_DomainTrust, ret);
if (trusts == NULL) {
return WERR_NOMEM;
}
diff --git a/source4/rpc_server/netlogon/schannel_state.c b/source4/rpc_server/netlogon/schannel_state.c
index 56f7152c14..a0bffcce06 100644
--- a/source4/rpc_server/netlogon/schannel_state.c
+++ b/source4/rpc_server/netlogon/schannel_state.c
@@ -154,7 +154,7 @@ NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx,
const struct ldb_val *val;
char *expr=NULL;
- *creds = talloc_zero_p(mem_ctx, struct creds_CredentialState);
+ *creds = talloc_zero(mem_ctx, struct creds_CredentialState);
if (!*creds) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index 1464ef0307..b1e9659198 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -37,7 +37,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
return NT_STATUS_INVALID_PARAMETER;
}
- private = talloc_p(dce_call->conn, struct dcesrv_remote_private);
+ private = talloc(dce_call->conn, struct dcesrv_remote_private);
if (!private) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index c3ec8bf80f..0bc44c410b 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -53,7 +53,7 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
ZERO_STRUCTP(r->out.connect_handle);
- c_state = talloc_p(dce_call->conn, struct samr_connect_state);
+ c_state = talloc(dce_call->conn, struct samr_connect_state);
if (!c_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -123,7 +123,7 @@ static NTSTATUS samr_QuerySecurity(struct dcesrv_call_state *dce_call, TALLOC_CT
DCESRV_PULL_HANDLE(h, r->in.handle, DCESRV_HANDLE_ANY);
- sd = talloc_p(mem_ctx, struct sec_desc_buf);
+ sd = talloc(mem_ctx, struct sec_desc_buf);
if (sd == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -232,7 +232,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
return NT_STATUS_OK;
}
- array = talloc_p(mem_ctx, struct samr_SamArray);
+ array = talloc(mem_ctx, struct samr_SamArray);
if (array == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -240,7 +240,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
array->count = 0;
array->entries = NULL;
- array->entries = talloc_array_p(mem_ctx, struct samr_SamEntry, count - start_i);
+ array->entries = talloc_array(mem_ctx, struct samr_SamEntry, count - start_i);
if (array->entries == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -300,7 +300,7 @@ static NTSTATUS samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX *
return NT_STATUS_NO_SUCH_DOMAIN;
}
- d_state = talloc_p(c_state, struct samr_domain_state);
+ d_state = talloc(c_state, struct samr_domain_state);
if (!d_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -426,7 +426,7 @@ static NTSTATUS samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_
d_state = h->data;
- r->out.info = talloc_p(mem_ctx, union samr_DomainInfo);
+ r->out.info = talloc(mem_ctx, union samr_DomainInfo);
if (!r->out.info) {
return NT_STATUS_NO_MEMORY;
}
@@ -541,7 +541,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(d_state, struct samr_account_state);
+ a_state = talloc(d_state, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -620,7 +620,7 @@ static NTSTATUS samr_EnumDomainGroups(struct dcesrv_call_state *dce_call, TALLOC
}
/* convert to SamEntry format */
- entries = talloc_array_p(mem_ctx, struct samr_SamEntry, ldb_cnt);
+ entries = talloc_array(mem_ctx, struct samr_SamEntry, ldb_cnt);
if (!entries) {
return NT_STATUS_NO_MEMORY;
}
@@ -661,7 +661,7 @@ static NTSTATUS samr_EnumDomainGroups(struct dcesrv_call_state *dce_call, TALLOC
r->out.num_entries = MIN(r->out.num_entries,
1+(r->in.max_size/SAMR_ENUM_USERS_MULTIPLIER));
- r->out.sam = talloc_p(mem_ctx, struct samr_SamArray);
+ r->out.sam = talloc(mem_ctx, struct samr_SamArray);
if (!r->out.sam) {
return NT_STATUS_NO_MEMORY;
}
@@ -811,7 +811,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(d_state, struct samr_account_state);
+ a_state = talloc(d_state, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -896,7 +896,7 @@ static NTSTATUS samr_EnumDomainUsers(struct dcesrv_call_state *dce_call, TALLOC_
}
/* convert to SamEntry format */
- entries = talloc_array_p(mem_ctx, struct samr_SamEntry, count);
+ entries = talloc_array(mem_ctx, struct samr_SamEntry, count);
if (!entries) {
return NT_STATUS_NO_MEMORY;
}
@@ -924,7 +924,7 @@ static NTSTATUS samr_EnumDomainUsers(struct dcesrv_call_state *dce_call, TALLOC_
r->out.num_entries = MIN(r->out.num_entries,
1+(r->in.max_size/SAMR_ENUM_USERS_MULTIPLIER));
- r->out.sam = talloc_p(mem_ctx, struct samr_SamArray);
+ r->out.sam = talloc(mem_ctx, struct samr_SamArray);
if (!r->out.sam) {
return NT_STATUS_NO_MEMORY;
}
@@ -1027,7 +1027,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(d_state, struct samr_account_state);
+ a_state = talloc(d_state, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -1101,7 +1101,7 @@ static NTSTATUS samr_EnumDomainAliases(struct dcesrv_call_state *dce_call, TALLO
}
/* convert to SamEntry format */
- entries = talloc_array_p(mem_ctx, struct samr_SamEntry, ldb_cnt);
+ entries = talloc_array(mem_ctx, struct samr_SamEntry, ldb_cnt);
if (!entries) {
return NT_STATUS_NO_MEMORY;
}
@@ -1140,7 +1140,7 @@ static NTSTATUS samr_EnumDomainAliases(struct dcesrv_call_state *dce_call, TALLO
r->out.num_entries = count - first;
r->out.num_entries = MIN(r->out.num_entries, 1000);
- r->out.sam = talloc_p(mem_ctx, struct samr_SamArray);
+ r->out.sam = talloc(mem_ctx, struct samr_SamArray);
if (!r->out.sam) {
return NT_STATUS_NO_MEMORY;
}
@@ -1223,7 +1223,7 @@ static NTSTATUS samr_GetAliasMembership(struct dcesrv_call_state *dce_call, TALL
}
r->out.rids->count = 0;
- r->out.rids->ids = talloc_array_p(mem_ctx, uint32_t, count);
+ r->out.rids->ids = talloc_array(mem_ctx, uint32_t, count);
if (r->out.rids->ids == NULL)
return NT_STATUS_NO_MEMORY;
@@ -1270,8 +1270,8 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX
return NT_STATUS_OK;
}
- r->out.rids.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names);
- r->out.types.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names);
+ r->out.rids.ids = talloc_array(mem_ctx, uint32_t, r->in.num_names);
+ r->out.types.ids = talloc_array(mem_ctx, uint32_t, r->in.num_names);
if (!r->out.rids.ids || !r->out.types.ids) {
return NT_STATUS_NO_MEMORY;
}
@@ -1351,8 +1351,8 @@ static NTSTATUS samr_LookupRids(struct dcesrv_call_state *dce_call, TALLOC_CTX *
if (r->in.num_rids == 0)
return NT_STATUS_OK;
- names = talloc_array_p(mem_ctx, struct samr_String, r->in.num_rids);
- ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_rids);
+ names = talloc_array(mem_ctx, struct samr_String, r->in.num_rids);
+ ids = talloc_array(mem_ctx, uint32_t, r->in.num_rids);
if ((names == NULL) || (ids == NULL))
return NT_STATUS_NO_MEMORY;
@@ -1450,7 +1450,7 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(d_state, struct samr_account_state);
+ a_state = talloc(d_state, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -1554,7 +1554,7 @@ static NTSTATUS samr_QueryGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_C
msg = res[0];
/* allocate the info structure */
- r->out.info = talloc_p(mem_ctx, union samr_GroupInfo);
+ r->out.info = talloc(mem_ctx, union samr_GroupInfo);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1813,7 +1813,7 @@ static NTSTATUS samr_QueryGroupMember(struct dcesrv_call_state *dce_call, TALLOC
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- array = talloc_p(mem_ctx, struct samr_ridArray);
+ array = talloc(mem_ctx, struct samr_ridArray);
if (array == NULL)
return NT_STATUS_NO_MEMORY;
@@ -1827,12 +1827,12 @@ static NTSTATUS samr_QueryGroupMember(struct dcesrv_call_state *dce_call, TALLOC
array->count = el->num_values;
- array->rids = talloc_array_p(mem_ctx, uint32,
+ array->rids = talloc_array(mem_ctx, uint32,
el->num_values);
if (array->rids == NULL)
return NT_STATUS_NO_MEMORY;
- array->unknown = talloc_array_p(mem_ctx, uint32,
+ array->unknown = talloc_array(mem_ctx, uint32,
el->num_values);
if (array->unknown == NULL)
return NT_STATUS_NO_MEMORY;
@@ -1924,7 +1924,7 @@ static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(d_state, struct samr_account_state);
+ a_state = talloc(d_state, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -1980,7 +1980,7 @@ static NTSTATUS samr_QueryAliasInfo(struct dcesrv_call_state *dce_call, TALLOC_C
msg = res[0];
/* allocate the info structure */
- r->out.info = talloc_p(mem_ctx, union samr_AliasInfo);
+ r->out.info = talloc(mem_ctx, union samr_AliasInfo);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2282,7 +2282,7 @@ static NTSTATUS samr_GetMembersInAlias(struct dcesrv_call_state *dce_call, TALLO
if (el != NULL) {
int i;
- sids = talloc_array_p(mem_ctx, struct lsa_SidPtr,
+ sids = talloc_array(mem_ctx, struct lsa_SidPtr,
el->num_values);
if (sids == NULL)
@@ -2356,7 +2356,7 @@ static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- a_state = talloc_p(mem_ctx, struct samr_account_state);
+ a_state = talloc(mem_ctx, struct samr_account_state);
if (!a_state) {
return NT_STATUS_NO_MEMORY;
}
@@ -2438,7 +2438,7 @@ static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
msg = res[0];
/* allocate the info structure */
- r->out.info = talloc_p(mem_ctx, union samr_UserInfo);
+ r->out.info = talloc(mem_ctx, union samr_UserInfo);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -2858,7 +2858,7 @@ static NTSTATUS samr_GetGroupsForUser(struct dcesrv_call_state *dce_call, TALLOC
if (count < 0)
return NT_STATUS_INTERNAL_DB_CORRUPTION;
- array = talloc_p(mem_ctx, struct samr_RidArray);
+ array = talloc(mem_ctx, struct samr_RidArray);
if (array == NULL)
return NT_STATUS_NO_MEMORY;
@@ -2867,7 +2867,7 @@ static NTSTATUS samr_GetGroupsForUser(struct dcesrv_call_state *dce_call, TALLOC
if (count > 0) {
int i;
- array->rid = talloc_array_p(mem_ctx, struct samr_RidType,
+ array->rid = talloc_array(mem_ctx, struct samr_RidType,
count);
if (array->rid == NULL)
@@ -2960,19 +2960,19 @@ static NTSTATUS samr_QueryDisplayInfo(struct dcesrv_call_state *dce_call, TALLOC
switch (r->in.level) {
case 1:
- entriesGeneral = talloc_array_p(mem_ctx,
+ entriesGeneral = talloc_array(mem_ctx,
struct samr_DispEntryGeneral,
ldb_cnt);
break;
case 2:
case 3:
- entriesFull = talloc_array_p(mem_ctx,
+ entriesFull = talloc_array(mem_ctx,
struct samr_DispEntryFull,
ldb_cnt);
break;
case 4:
case 5:
- entriesAscii = talloc_array_p(mem_ctx,
+ entriesAscii = talloc_array(mem_ctx,
struct samr_DispEntryAscii,
ldb_cnt);
break;
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 085fe450ac..ae20de1623 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -408,11 +408,11 @@ failed:
}
/* on failure we need to fill in the reject reasons */
- dominfo = talloc_p(mem_ctx, struct samr_DomInfo1);
+ dominfo = talloc(mem_ctx, struct samr_DomInfo1);
if (dominfo == NULL) {
return status;
}
- reject = talloc_p(mem_ctx, struct samr_ChangeReject);
+ reject = talloc(mem_ctx, struct samr_ChangeReject);
if (reject == NULL) {
return status;
}
@@ -683,12 +683,12 @@ NTSTATUS samdb_set_password(void *ctx, TALLOC_CTX *mem_ctx,
}
/* store the password history */
- new_lmPwdHistory = talloc_array_p(mem_ctx, struct samr_Password,
+ new_lmPwdHistory = talloc_array(mem_ctx, struct samr_Password,
pwdHistoryLength);
if (!new_lmPwdHistory) {
return NT_STATUS_NO_MEMORY;
}
- new_ntPwdHistory = talloc_array_p(mem_ctx, struct samr_Password,
+ new_ntPwdHistory = talloc_array(mem_ctx, struct samr_Password,
pwdHistoryLength);
if (!new_ntPwdHistory) {
return NT_STATUS_NO_MEMORY;
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index ff0a5641b7..8bb6a5c60f 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -33,7 +33,7 @@ static WERROR spoolss_EnumPrinters1(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo1 *info;
int i;
- info = talloc_array_p(mem_ctx, struct spoolss_PrinterInfo1, num_msgs);
+ info = talloc_array(mem_ctx, struct spoolss_PrinterInfo1, num_msgs);
if (!info)
return WERR_NOMEM;
@@ -59,7 +59,7 @@ static WERROR spoolss_EnumPrinters2(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo2 *info;
int i;
- info = talloc_array_p(mem_ctx, struct spoolss_PrinterInfo2, num_msgs);
+ info = talloc_array(mem_ctx, struct spoolss_PrinterInfo2, num_msgs);
if (!info)
return WERR_NOMEM;
@@ -102,7 +102,7 @@ static WERROR spoolss_EnumPrinters5(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterInfo5 *info;
int i;
- info = talloc_array_p(mem_ctx, struct spoolss_PrinterInfo5, num_msgs);
+ info = talloc_array(mem_ctx, struct spoolss_PrinterInfo5, num_msgs);
if (!info)
return WERR_NOMEM;
@@ -168,7 +168,7 @@ static WERROR spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TALLOC_CT
goto done;
}
- r->out.buffer = talloc_p(mem_ctx, DATA_BLOB);
+ r->out.buffer = talloc(mem_ctx, DATA_BLOB);
if (!r->out.buffer) {
result = WERR_NOMEM;
@@ -893,7 +893,7 @@ static WERROR spoolss_OpenPrinterEx_server(struct dcesrv_call_state *dce_call,
return WERR_NOMEM;
}
- state = talloc_p(handle, struct spoolss_openprinter_state);
+ state = talloc(handle, struct spoolss_openprinter_state);
if (!state) {
return WERR_OK;
}
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index 57afa4530e..3362d2f4d1 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -38,7 +38,7 @@ static WERROR srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_C
switch (r->in.level) {
case 0:
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
@@ -47,7 +47,7 @@ static WERROR srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_C
return WERR_NOT_SUPPORTED;
case 1:
- r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevCtr1);
+ r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevCtr1);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
@@ -111,7 +111,7 @@ static WERROR srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_
switch (r->in.level) {
case 0:
{
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
@@ -121,7 +121,7 @@ static WERROR srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_
}
case 1:
{
- r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQCtr1);
+ r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetCharDevQCtr1);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
@@ -224,7 +224,7 @@ static WERROR srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
switch (r->in.level) {
case 0:
{
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetConnCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
@@ -234,7 +234,7 @@ static WERROR srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 1:
{
- r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr1);
+ r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetConnCtr1);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
@@ -263,7 +263,7 @@ static WERROR srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
switch (r->in.level) {
case 2:
{
- r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr2);
+ r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetFileCtr2);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
r->out.ctr.ctr2->count = 0;
@@ -273,7 +273,7 @@ static WERROR srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 3:
{
- r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr3);
+ r->out.ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetFileCtr3);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr3);
r->out.ctr.ctr3->count = 0;
@@ -337,7 +337,7 @@ static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
switch (r->in.level) {
case 0:
{
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetSessCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
@@ -347,7 +347,7 @@ static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 1:
{
- r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr1);
+ r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetSessCtr1);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
@@ -357,7 +357,7 @@ static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 2:
{
- r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr2);
+ r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetSessCtr2);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
r->out.ctr.ctr2->count = 0;
@@ -367,7 +367,7 @@ static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 10:
{
- r->out.ctr.ctr10 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr10);
+ r->out.ctr.ctr10 = talloc(mem_ctx, struct srvsvc_NetSessCtr10);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr10);
r->out.ctr.ctr2->count = 0;
@@ -377,7 +377,7 @@ static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
}
case 502:
{
- r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr502);
+ r->out.ctr.ctr502 = talloc(mem_ctx, struct srvsvc_NetSessCtr502);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr502);
r->out.ctr.ctr2->count = 0;
@@ -556,7 +556,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
int i;
struct srvsvc_NetShareCtr0 *ctr0;
- ctr0 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr0);
+ ctr0 = talloc(mem_ctx, struct srvsvc_NetShareCtr0);
W_ERROR_HAVE_NO_MEMORY(ctr0);
ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -567,7 +567,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_OK;
}
- ctr0->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo0, ctr0->count);
+ ctr0->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo0, ctr0->count);
W_ERROR_HAVE_NO_MEMORY(ctr0->array);
for (i=0; i < ctr0->count; i++) {
@@ -590,7 +590,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
int i;
struct srvsvc_NetShareCtr1 *ctr1;
- ctr1 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr1);
+ ctr1 = talloc(mem_ctx, struct srvsvc_NetShareCtr1);
W_ERROR_HAVE_NO_MEMORY(ctr1);
ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -601,7 +601,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_OK;
}
- ctr1->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo1, ctr1->count);
+ ctr1->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo1, ctr1->count);
W_ERROR_HAVE_NO_MEMORY(ctr1->array);
for (i=0; i < ctr1->count; i++) {
@@ -624,7 +624,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
int i;
struct srvsvc_NetShareCtr2 *ctr2;
- ctr2 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr2);
+ ctr2 = talloc(mem_ctx, struct srvsvc_NetShareCtr2);
W_ERROR_HAVE_NO_MEMORY(ctr2);
ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -635,7 +635,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_OK;
}
- ctr2->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo2, ctr2->count);
+ ctr2->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo2, ctr2->count);
W_ERROR_HAVE_NO_MEMORY(ctr2->array);
for (i=0; i < ctr2->count; i++) {
@@ -658,7 +658,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
int i;
struct srvsvc_NetShareCtr501 *ctr501;
- ctr501 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr501);
+ ctr501 = talloc(mem_ctx, struct srvsvc_NetShareCtr501);
W_ERROR_HAVE_NO_MEMORY(ctr501);
ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -669,7 +669,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_OK;
}
- ctr501->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo501, ctr501->count);
+ ctr501->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo501, ctr501->count);
W_ERROR_HAVE_NO_MEMORY(ctr501->array);
for (i=0; i < ctr501->count; i++) {
@@ -692,7 +692,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
int i;
struct srvsvc_NetShareCtr502 *ctr502;
- ctr502 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr502);
+ ctr502 = talloc(mem_ctx, struct srvsvc_NetShareCtr502);
W_ERROR_HAVE_NO_MEMORY(ctr502);
ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -703,7 +703,7 @@ static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_OK;
}
- ctr502->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo502, ctr502->count);
+ ctr502->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo502, ctr502->count);
W_ERROR_HAVE_NO_MEMORY(ctr502->array);
for (i=0; i < ctr502->count; i++) {
@@ -757,7 +757,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info0 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo0);
+ info.info0 = talloc(mem_ctx, struct srvsvc_NetShareInfo0);
W_ERROR_HAVE_NO_MEMORY(info.info0);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -773,7 +773,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info1 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo1);
+ info.info1 = talloc(mem_ctx, struct srvsvc_NetShareInfo1);
W_ERROR_HAVE_NO_MEMORY(info.info1);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -789,7 +789,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info2 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo2);
+ info.info2 = talloc(mem_ctx, struct srvsvc_NetShareInfo2);
W_ERROR_HAVE_NO_MEMORY(info.info2);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -805,7 +805,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info501 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo501);
+ info.info501 = talloc(mem_ctx, struct srvsvc_NetShareInfo501);
W_ERROR_HAVE_NO_MEMORY(info.info501);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -821,7 +821,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info502 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo502);
+ info.info502 = talloc(mem_ctx, struct srvsvc_NetShareInfo502);
W_ERROR_HAVE_NO_MEMORY(info.info502);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -837,7 +837,7 @@ static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
WERROR status;
union srvsvc_NetShareInfo info;
- info.info1005 = talloc_p(mem_ctx, struct srvsvc_NetShareInfo1005);
+ info.info1005 = talloc(mem_ctx, struct srvsvc_NetShareInfo1005);
W_ERROR_HAVE_NO_MEMORY(info.info1005);
status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, snum, r->in.level, &info);
@@ -927,7 +927,7 @@ static WERROR srvsvc_NetSrvGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
{
struct srvsvc_NetSrvInfo100 *info100;
- info100 = talloc_p(mem_ctx, struct srvsvc_NetSrvInfo100);
+ info100 = talloc(mem_ctx, struct srvsvc_NetSrvInfo100);
W_ERROR_HAVE_NO_MEMORY(info100);
info100->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
@@ -941,7 +941,7 @@ static WERROR srvsvc_NetSrvGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
{
struct srvsvc_NetSrvInfo101 *info101;
- info101 = talloc_p(mem_ctx, struct srvsvc_NetSrvInfo101);
+ info101 = talloc(mem_ctx, struct srvsvc_NetSrvInfo101);
W_ERROR_HAVE_NO_MEMORY(info101);
info101->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
@@ -989,7 +989,7 @@ static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
switch (r->in.level) {
case 0:
{
- r->out.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetDiskCtr0);
+ r->out.ctr0 = talloc(mem_ctx, struct srvsvc_NetDiskCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr0);
r->out.ctr0->unknown = 0x1;
@@ -1039,7 +1039,7 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
switch (r->in.level) {
case 0:
{
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetTransportCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
@@ -1049,7 +1049,7 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
}
case 1:
{
- r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr1);
+ r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetTransportCtr1);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
@@ -1059,7 +1059,7 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
}
case 2:
{
- r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr2);
+ r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetTransportCtr2);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
r->out.ctr.ctr2->count = 0;
@@ -1069,7 +1069,7 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
}
case 3:
{
- r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr3);
+ r->out.ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetTransportCtr3);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr3);
r->out.ctr.ctr3->count = 0;
@@ -1105,7 +1105,7 @@ static WERROR srvsvc_NetRemoteTOD(struct dcesrv_call_state *dce_call, TALLOC_CTX
time_t t;
struct tm tm;
- r->out.info = talloc_p(mem_ctx, struct srvsvc_NetRemoteTODInfo);
+ r->out.info = talloc(mem_ctx, struct srvsvc_NetRemoteTODInfo);
W_ERROR_HAVE_NO_MEMORY(r->out.info);
GetTimeOfDay(&tval);
@@ -1228,7 +1228,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
uint32_t count;
struct srvsvc_NetShareCtr0 *ctr0;
- ctr0 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr0);
+ ctr0 = talloc(mem_ctx, struct srvsvc_NetShareCtr0);
W_ERROR_HAVE_NO_MEMORY(ctr0);
ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -1239,7 +1239,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
- ctr0->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo0, ctr0->count);
+ ctr0->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo0, ctr0->count);
W_ERROR_HAVE_NO_MEMORY(ctr0->array);
count = ctr0->count;
@@ -1269,7 +1269,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
uint32_t count;
struct srvsvc_NetShareCtr1 *ctr1;
- ctr1 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr1);
+ ctr1 = talloc(mem_ctx, struct srvsvc_NetShareCtr1);
W_ERROR_HAVE_NO_MEMORY(ctr1);
ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -1280,7 +1280,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
- ctr1->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo1, ctr1->count);
+ ctr1->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo1, ctr1->count);
W_ERROR_HAVE_NO_MEMORY(ctr1->array);
count = ctr1->count;
@@ -1310,7 +1310,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
uint32_t count;
struct srvsvc_NetShareCtr2 *ctr2;
- ctr2 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr2);
+ ctr2 = talloc(mem_ctx, struct srvsvc_NetShareCtr2);
W_ERROR_HAVE_NO_MEMORY(ctr2);
ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -1321,7 +1321,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
- ctr2->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo2, ctr2->count);
+ ctr2->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo2, ctr2->count);
W_ERROR_HAVE_NO_MEMORY(ctr2->array);
count = ctr2->count;
@@ -1351,7 +1351,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
uint32_t count;
struct srvsvc_NetShareCtr501 *ctr501;
- ctr501 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr501);
+ ctr501 = talloc(mem_ctx, struct srvsvc_NetShareCtr501);
W_ERROR_HAVE_NO_MEMORY(ctr501);
ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -1362,7 +1362,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
- ctr501->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo501, ctr501->count);
+ ctr501->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo501, ctr501->count);
W_ERROR_HAVE_NO_MEMORY(ctr501->array);
count = ctr501->count;
@@ -1392,7 +1392,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
uint32_t count;
struct srvsvc_NetShareCtr502 *ctr502;
- ctr502 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr502);
+ ctr502 = talloc(mem_ctx, struct srvsvc_NetShareCtr502);
W_ERROR_HAVE_NO_MEMORY(ctr502);
ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
@@ -1403,7 +1403,7 @@ static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
- ctr502->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo502, ctr502->count);
+ ctr502->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo502, ctr502->count);
W_ERROR_HAVE_NO_MEMORY(ctr502->array);
count = ctr502->count;
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index 58bee5e18b..c0da3cbb11 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -167,10 +167,10 @@ static WERROR winreg_EnumKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
if (W_ERROR_IS_OK(r->out.result)) {
r->out.key_name_len = strlen(key->name);
- r->out.out_name = talloc_zero_p(mem_ctx, struct winreg_EnumKeyNameResponse);
+ r->out.out_name = talloc_zero(mem_ctx, struct winreg_EnumKeyNameResponse);
r->out.out_name->name = key->name;
- r->out.class = talloc_zero_p(mem_ctx, struct winreg_String);
- r->out.last_changed_time = talloc_zero_p(mem_ctx, struct winreg_Time);
+ r->out.class = talloc_zero(mem_ctx, struct winreg_String);
+ r->out.last_changed_time = talloc_zero(mem_ctx, struct winreg_Time);
}
return r->out.result;
@@ -197,11 +197,11 @@ static WERROR winreg_EnumValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
return result;
}
- r->out.type = talloc_p(mem_ctx, uint32_t);
+ r->out.type = talloc(mem_ctx, uint32_t);
*r->out.type = value->data_type;
r->out.name_out.name = value->name;
r->out.value = value->data_blk;
- r->out.size = talloc_p(mem_ctx, uint32_t);
+ r->out.size = talloc(mem_ctx, uint32_t);
r->out.length = r->out.size;
*r->out.size = value->data_len;
@@ -353,7 +353,7 @@ static WERROR winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *
r->out.type = &val->data_type;
r->out.length = &val->data_len;
if (!r->in.data) {
- r->out.size = talloc_p(mem_ctx, uint32);
+ r->out.size = talloc(mem_ctx, uint32);
*r->out.size = val->data_len;
} else {
r->out.size = r->in.size;
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index 82de29e44e..793b86d9dc 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -42,7 +42,7 @@ static WERROR wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
{
struct wkssvc_NetWkstaInfo100 *info100;
- info100 = talloc_p(mem_ctx, struct wkssvc_NetWkstaInfo100);
+ info100 = talloc(mem_ctx, struct wkssvc_NetWkstaInfo100);
W_ERROR_HAVE_NO_MEMORY(info100);
info100->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
@@ -60,7 +60,7 @@ static WERROR wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLOC_
{
struct wkssvc_NetWkstaInfo101 *info101;
- info101 = talloc_p(mem_ctx, struct wkssvc_NetWkstaInfo101);
+ info101 = talloc(mem_ctx, struct wkssvc_NetWkstaInfo101);
W_ERROR_HAVE_NO_MEMORY(info101);
info101->platform_id = dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
@@ -143,7 +143,7 @@ static WERROR wkssvc_NetWkstaTransportEnum(struct dcesrv_call_state *dce_call, T
switch (r->in.level) {
case 0:
- r->out.ctr.ctr0 = talloc_p(mem_ctx, struct wkssvc_NetWkstaTransportCtr0);
+ r->out.ctr.ctr0 = talloc(mem_ctx, struct wkssvc_NetWkstaTransportCtr0);
W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
diff --git a/source4/smb_server/conn.c b/source4/smb_server/conn.c
index c70ed95915..427add0aa2 100644
--- a/source4/smb_server/conn.c
+++ b/source4/smb_server/conn.c
@@ -69,7 +69,7 @@ struct smbsrv_tcon *smbsrv_tcon_new(struct smbsrv_connection *smb_conn)
struct smbsrv_tcon *tcon;
int i;
- tcon = talloc_zero_p(smb_conn, struct smbsrv_tcon);
+ tcon = talloc_zero(smb_conn, struct smbsrv_tcon);
if (!tcon) return NULL;
i = idr_get_new(smb_conn->tree.idtree_tid, tcon, UINT16_MAX);
diff --git a/source4/smb_server/nttrans.c b/source4/smb_server/nttrans.c
index 5875554258..9a3b919d8b 100644
--- a/source4/smb_server/nttrans.c
+++ b/source4/smb_server/nttrans.c
@@ -66,7 +66,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
}
/* parse the request */
- io = talloc_p(req, union smb_open);
+ io = talloc(req, union smb_open);
if (io == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -110,7 +110,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
DATA_BLOB blob;
blob.data = trans->in.data.data;
blob.length = sd_length;
- io->ntcreatex.in.sec_desc = talloc_p(io, struct security_descriptor);
+ io->ntcreatex.in.sec_desc = talloc(io, struct security_descriptor);
if (io->ntcreatex.in.sec_desc == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -127,7 +127,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
DATA_BLOB blob;
blob.data = trans->in.data.data + sd_length;
blob.length = ea_length;
- io->ntcreatex.in.ea_list = talloc_p(io, struct smb_ea_list);
+ io->ntcreatex.in.ea_list = talloc(io, struct smb_ea_list);
if (io->ntcreatex.in.ea_list == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -190,7 +190,7 @@ static NTSTATUS nttrans_query_sec_desc(struct smbsrv_request *req,
}
/* parse the request */
- io = talloc_p(req, union smb_fileinfo);
+ io = talloc(req, union smb_fileinfo);
if (io == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -238,7 +238,7 @@ static NTSTATUS nttrans_set_sec_desc(struct smbsrv_request *req,
}
/* parse the request */
- io = talloc_p(req, union smb_setfileinfo);
+ io = talloc(req, union smb_setfileinfo);
if (io == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -247,7 +247,7 @@ static NTSTATUS nttrans_set_sec_desc(struct smbsrv_request *req,
io->set_secdesc.file.fnum = SVAL(trans->in.params.data, 0);
io->set_secdesc.in.secinfo_flags = IVAL(trans->in.params.data, 4);
- io->set_secdesc.in.sd = talloc_p(io, struct security_descriptor);
+ io->set_secdesc.in.sd = talloc(io, struct security_descriptor);
if (io->set_secdesc.in.sd == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -383,7 +383,7 @@ void reply_nttrans(struct smbsrv_request *req)
}
/* parse out the setup words */
- trans.in.setup = talloc_array_p(req, uint16_t, trans.in.setup_count);
+ trans.in.setup = talloc_array(req, uint16_t, trans.in.setup_count);
if (!trans.in.setup) {
req_reply_error(req, NT_STATUS_NO_MEMORY);
return;
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c
index 91a9eac3c7..3d7723936d 100644
--- a/source4/smb_server/password.c
+++ b/source4/smb_server/password.c
@@ -99,9 +99,9 @@ uint16_t smbsrv_register_session(struct smbsrv_connection *smb_conn,
{
struct smbsrv_session *sess = NULL;
- sess = talloc_p(smb_conn, struct smbsrv_session);
+ sess = talloc(smb_conn, struct smbsrv_session);
if(sess == NULL) {
- DEBUG(0,("talloc_p(smb_conn->mem_ctx, struct smbsrv_session) failed\n"));
+ DEBUG(0,("talloc(smb_conn->mem_ctx, struct smbsrv_session) failed\n"));
return UID_FIELD_INVALID;
}
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index f7f39f39d5..c2aca04661 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -47,7 +47,7 @@ struct smbsrv_request *init_smb_request(struct smbsrv_connection *smb_conn)
{
struct smbsrv_request *req;
- req = talloc_p(smb_conn, struct smbsrv_request);
+ req = talloc(smb_conn, struct smbsrv_request);
if (!req) {
return NULL;
}
@@ -57,7 +57,7 @@ struct smbsrv_request *init_smb_request(struct smbsrv_connection *smb_conn)
/* setup the request context */
req->smb_conn = smb_conn;
- req->async_states = talloc_p(req, struct ntvfs_async_state);
+ req->async_states = talloc(req, struct ntvfs_async_state);
if (!req->async_states) {
talloc_free(req);
return NULL;
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 1cbc831a17..394923635d 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -80,7 +80,7 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn, struct t
return NT_STATUS_NO_MEMORY;
}
- req->in.buffer = talloc_array_p(req, uint8_t, NBT_HDR_SIZE);
+ req->in.buffer = talloc_array(req, uint8_t, NBT_HDR_SIZE);
if (req->in.buffer == NULL) {
talloc_free(req);
return NT_STATUS_NO_MEMORY;
@@ -805,7 +805,7 @@ static void smbsrv_accept(struct server_connection *conn)
DEBUG(5,("smbsrv_accept\n"));
- smb_conn = talloc_zero_p(conn, struct smbsrv_connection);
+ smb_conn = talloc_zero(conn, struct smbsrv_connection);
if (!smb_conn) return;
/* now initialise a few default values associated with this smb socket */
diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c
index 2b9573383f..a1033e9476 100644
--- a/source4/smb_server/trans2.c
+++ b/source4/smb_server/trans2.c
@@ -426,7 +426,7 @@ static NTSTATUS trans2_open(struct smbsrv_request *req, struct smb_trans2 *trans
return NT_STATUS_FOOBAR;
}
- io = talloc_p(req, union smb_open);
+ io = talloc(req, union smb_open);
if (io == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -487,7 +487,7 @@ static NTSTATUS trans2_mkdir(struct smbsrv_request *req, struct smb_trans2 *tran
return NT_STATUS_FOOBAR;
}
- io = talloc_p(req, union smb_mkdir);
+ io = talloc(req, union smb_mkdir);
if (io == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1437,7 +1437,7 @@ static void reply_trans_continue(struct smbsrv_request *req, uint8_t command,
return;
}
- tp = talloc_p(req, struct smbsrv_trans_partial);
+ tp = talloc(req, struct smbsrv_trans_partial);
tp->req = talloc_reference(tp, req);
tp->trans = trans;
@@ -1563,7 +1563,7 @@ void reply_trans_generic(struct smbsrv_request *req, uint8_t command)
uint16_t param_count, data_count;
uint16_t param_total, data_total;
- trans = talloc_p(req, struct smb_trans2);
+ trans = talloc(req, struct smb_trans2);
if (trans == NULL) {
req_reply_error(req, NT_STATUS_NO_MEMORY);
return;
@@ -1594,7 +1594,7 @@ void reply_trans_generic(struct smbsrv_request *req, uint8_t command)
}
/* parse out the setup words */
- trans->in.setup = talloc_array_p(req, uint16_t, trans->in.setup_count);
+ trans->in.setup = talloc_array(req, uint16_t, trans->in.setup_count);
if (trans->in.setup_count && !trans->in.setup) {
req_reply_error(req, NT_STATUS_NO_MEMORY);
return;
@@ -1682,7 +1682,7 @@ static void reply_transs_generic(struct smbsrv_request *req, uint8_t command)
/* add to the existing request */
if (param_count != 0) {
- trans->in.params.data = talloc_realloc_p(trans,
+ trans->in.params.data = talloc_realloc(trans,
trans->in.params.data,
uint8_t,
param_disp + param_count);
@@ -1693,7 +1693,7 @@ static void reply_transs_generic(struct smbsrv_request *req, uint8_t command)
}
if (data_count != 0) {
- trans->in.data.data = talloc_realloc_p(trans,
+ trans->in.data.data = talloc_realloc(trans,
trans->in.data.data,
uint8_t,
data_disp + data_count);
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index 378ca1914d..2d532b638d 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -148,7 +148,7 @@ struct server_stream_socket *service_setup_stream_socket(struct server_service *
stream_socket = talloc_zero(service, struct server_stream_socket);
if (!stream_socket) {
- DEBUG(0,("talloc_p(mem_ctx, struct server_stream_socket) failed\n"));
+ DEBUG(0,("talloc(mem_ctx, struct server_stream_socket) failed\n"));
socket_destroy(sock);
return NULL;
}
@@ -207,9 +207,9 @@ struct server_connection *server_setup_connection(struct event_context *ev,
struct timed_event idle;
struct server_connection *srv_conn;
- srv_conn = talloc_p(stream_socket, struct server_connection);
+ srv_conn = talloc(stream_socket, struct server_connection);
if (!srv_conn) {
- DEBUG(0,("talloc_p(mem_ctx, struct server_connection) failed\n"));
+ DEBUG(0,("talloc(mem_ctx, struct server_connection) failed\n"));
return NULL;
}
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;
}
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index 350ec251d9..7b716f0916 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -210,7 +210,7 @@ static int binary_net(int argc, const char **argv)
net_init_subsystems;
mem_ctx = talloc_init("net_context");
- ctx = talloc_p(mem_ctx, struct net_context);
+ ctx = talloc(mem_ctx, struct net_context);
if (!ctx) {
d_printf("talloc_init(net_context) failed\n");
exit(1);
@@ -228,7 +228,7 @@ static int binary_net(int argc, const char **argv)
DEBUG(0,("return code = %d\n", rc));
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return rc;
}
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 804c8d3c17..b5e3f3b3ea 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -190,7 +190,7 @@ static NTSTATUS local_pw_check_specified(const char *username,
domain, username, workstation,
nt_errstr(nt_status)));
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
}
if (error_string) {
*error_string = strdup(nt_errstr(nt_status));
@@ -779,7 +779,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode,
return;
}
if (!mux_private) {
- mux_private = talloc_p(NULL, struct mux_private);
+ mux_private = talloc(NULL, struct mux_private);
mux_private->max_mux = 0;
mux_private->private_pointers = NULL;
}
@@ -790,7 +790,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode,
unsigned int prev_max = mux_private->max_mux;
mux_private->max_mux = mux_id + 1;
mux_private->private_pointers
- = talloc_realloc_p(mux_private,
+ = talloc_realloc(mux_private,
mux_private->private_pointers,
void *, mux_private->max_mux);
memset(&mux_private->private_pointers[prev_max], '\0',