r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
authorAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2005 07:08:20 +0000 (07:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:15 +0000 (13:09 -0500)
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)

200 files changed:
source4/client/client.c
source4/dsdb/samdb/samdb.c
source4/gtk/common/gtk-smb.c
source4/gtk/common/select.c
source4/gtk/tools/gepdump.c
source4/gtk/tools/gregedit.c
source4/gtk/tools/gwcrontab.c
source4/gtk/tools/gwsam.c
source4/include/includes.h
source4/intl/lang_tdb.c
source4/ldap_server/ldap_backend.c
source4/ldap_server/ldap_hacked_ldb.c
source4/ldap_server/ldap_parse.c
source4/ldap_server/ldap_rootdse.c
source4/ldap_server/ldap_server.c
source4/ldap_server/ldap_simple_ldb.c
source4/lib/data_blob.c
source4/lib/db_wrap.c
source4/lib/dcom/common/main.c
source4/lib/dcom/common/tables.c
source4/lib/genrand.c
source4/lib/idtree.c
source4/lib/messaging/messaging.c
source4/lib/ms_fnmatch.c
source4/lib/netif/interface.c
source4/lib/registry/common/reg_interface.c
source4/lib/registry/common/reg_util.c
source4/lib/registry/reg_backend_dir.c
source4/lib/registry/reg_backend_gconf.c
source4/lib/registry/reg_backend_ldb.c
source4/lib/registry/reg_backend_nt4.c
source4/lib/registry/reg_backend_rpc.c
source4/lib/registry/reg_backend_w95.c
source4/lib/registry/reg_samba.c
source4/lib/registry/tools/regdiff.c
source4/lib/registry/tools/regshell.c
source4/lib/registry/tools/regtree.c
source4/lib/socket/socket_ipv4.c
source4/lib/socket/socket_ipv6.c
source4/lib/socket/socket_unix.c
source4/lib/unix_privs.c
source4/lib/util_sock.c
source4/lib/util_str.c
source4/lib/util_unistr.c
source4/libads/ldap.c
source4/libads/ldap_printer.c
source4/libads/ldap_user.c
source4/libcli/auth/clikrb5.c
source4/libcli/auth/gensec.c
source4/libcli/auth/gensec_gssapi.c
source4/libcli/auth/gensec_krb5.c
source4/libcli/auth/gensec_ntlmssp.c
source4/libcli/auth/ntlmssp.c
source4/libcli/auth/ntlmssp_parse.c
source4/libcli/auth/schannel.c
source4/libcli/auth/spnego.c
source4/libcli/auth/spnego_parse.c
source4/libcli/cliconnect.c
source4/libcli/clifile.c
source4/libcli/clilist.c
source4/libcli/clitrans2.c
source4/libcli/ldap/ldap.c
source4/libcli/ldap/ldap_client.c
source4/libcli/ldap/ldap_ldif.c
source4/libcli/raw/rawacl.c
source4/libcli/raw/raweas.c
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawfileinfo.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawsetfileinfo.c
source4/libcli/security/dom_sid.c
source4/libcli/security/security_descriptor.c
source4/libcli/security/security_token.c
source4/libcli/util/asn1.c
source4/libcli/util/clilsa.c
source4/libcli/util/smbencrypt.c
source4/libnet/libnet.c
source4/libnet/libnet_join.c
source4/libnet/libnet_passwd.c
source4/librpc/ndr/ndr.c
source4/librpc/ndr/ndr_dcom.c
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc_schannel.c
source4/librpc/rpc/dcerpc_smb.c
source4/librpc/rpc/dcerpc_sock.c
source4/librpc/rpc/dcerpc_util.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/common/brlock.c
source4/ntvfs/common/opendb.c
source4/ntvfs/common/sidmap.c
source4/ntvfs/ipc/ipc_rap.c
source4/ntvfs/ipc/rap_server.c
source4/ntvfs/nbench/vfs_nbench.c
source4/ntvfs/ntvfs_generic.c
source4/ntvfs/ntvfs_util.c
source4/ntvfs/posix/pvfs_acl.c
source4/ntvfs/posix/pvfs_dirlist.c
source4/ntvfs/posix/pvfs_lock.c
source4/ntvfs/posix/pvfs_open.c
source4/ntvfs/posix/pvfs_qfileinfo.c
source4/ntvfs/posix/pvfs_resolve.c
source4/ntvfs/posix/pvfs_search.c
source4/ntvfs/posix/pvfs_setfileinfo.c
source4/ntvfs/posix/pvfs_shortname.c
source4/ntvfs/posix/pvfs_streams.c
source4/ntvfs/posix/pvfs_wait.c
source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/posix/xattr_tdb.c
source4/ntvfs/simple/svfs_util.c
source4/ntvfs/simple/vfs_simple.c
source4/ntvfs/unixuid/vfs_unixuid.c
source4/param/loadparm.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_sock.c
source4/rpc_server/dcesrv_auth.c
source4/rpc_server/dcom/remact.c
source4/rpc_server/dcom/rot.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/rpc_server/drsuapi/drsuapi_cracknames.c
source4/rpc_server/dssetup/dcesrv_dssetup.c
source4/rpc_server/echo/rpc_echo.c
source4/rpc_server/epmapper/rpc_epmapper.c
source4/rpc_server/handles.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/netlogon/schannel_state.c
source4/rpc_server/remote/dcesrv_remote.c
source4/rpc_server/samr/dcesrv_samr.c
source4/rpc_server/samr/samr_password.c
source4/rpc_server/spoolss/dcesrv_spoolss.c
source4/rpc_server/srvsvc/dcesrv_srvsvc.c
source4/rpc_server/winreg/rpc_winreg.c
source4/rpc_server/wkssvc/dcesrv_wkssvc.c
source4/smb_server/conn.c
source4/smb_server/nttrans.c
source4/smb_server/password.c
source4/smb_server/request.c
source4/smb_server/smb_server.c
source4/smb_server/trans2.c
source4/smbd/service.c
source4/torture/basic/aliases.c
source4/torture/basic/delaywrite.c
source4/torture/basic/disconnect.c
source4/torture/basic/scanner.c
source4/torture/dcom/simple.c
source4/torture/gentest.c
source4/torture/ldap/basic.c
source4/torture/local/binding_string.c
source4/torture/nbench/nbio.c
source4/torture/rap/rap.c
source4/torture/raw/acls.c
source4/torture/raw/chkpath.c
source4/torture/raw/close.c
source4/torture/raw/composite.c
source4/torture/raw/context.c
source4/torture/raw/eas.c
source4/torture/raw/ioctl.c
source4/torture/raw/lock.c
source4/torture/raw/mkdir.c
source4/torture/raw/mux.c
source4/torture/raw/notify.c
source4/torture/raw/open.c
source4/torture/raw/oplock.c
source4/torture/raw/qfileinfo.c
source4/torture/raw/qfsinfo.c
source4/torture/raw/read.c
source4/torture/raw/rename.c
source4/torture/raw/search.c
source4/torture/raw/seek.c
source4/torture/raw/setfileinfo.c
source4/torture/raw/streams.c
source4/torture/raw/unlink.c
source4/torture/raw/write.c
source4/torture/rpc/alter_context.c
source4/torture/rpc/atsvc.c
source4/torture/rpc/bind.c
source4/torture/rpc/dcom.c
source4/torture/rpc/dfs.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/dssetup.c
source4/torture/rpc/epmapper.c
source4/torture/rpc/eventlog.c
source4/torture/rpc/lsa.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/oxidresolve.c
source4/torture/rpc/remact.c
source4/torture/rpc/samlogon.c
source4/torture/rpc/samr.c
source4/torture/rpc/samsync.c
source4/torture/rpc/spoolss.c
source4/torture/rpc/srvsvc.c
source4/torture/rpc/svcctl.c
source4/torture/rpc/testjoin.c
source4/torture/rpc/winreg.c
source4/torture/rpc/wkssvc.c
source4/torture/rpc/xplogin.c
source4/torture/torture.c
source4/torture/torture_util.c
source4/utils/net/net.c
source4/utils/ntlm_auth.c

index a3631fd710a403dbc182bb28ffde120c5385d82f..5413beb3ba37adf4ff3604cb09823446860bd876 100644 (file)
@@ -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;
index 4edc1a652a93b51de46dcd248358019e7a8ec295..a4f200c33f56ca9cf0f8c68510038102405cef17 100644 (file)
@@ -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;
        }
index 639aa68bac12d1e5003c48ae314ae9f2ea596c5c..f42516c85481928243b8b2c49e33def80cd07778 100644 (file)
@@ -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);
 
index 1409a625d0906c56a5a89ffa92f0ee981984518e..082f449a0cef4c6720687f5cf7db8bb5cfd48bf8 100644 (file)
@@ -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 );
 }
index f6e39aacb27ab04c6a3927a76057b51f1277fb37..4c8595f87c30293fae7ea0181c792afa5b046bb0 100644 (file)
@@ -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)
index 6ca7fb653f57a1942ccd9426b647c5660b73e0a5..918ebd69450069ba4886d337be04bcebafa5c388 100644 (file)
@@ -990,7 +990,7 @@ static GtkWidget* create_savefilewin (void)
 
        gtk_main ();
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return 0;
 }
 
index b41c0ffdcb7f5361cb4a0701950b711917a04c33..063469e334321a697194933767e0eda6ebb6c5fb 100644 (file)
@@ -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;
index d4da7a2fdf6eb41d6650015c2ee3f63284fa8f73..7d9abde3d3d2b13c242dcbc4ce5286cd79a4ae5e 100644 (file)
@@ -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);
 
 }
 
index 68e369a77be2ae36ca162c887ba9009fdecd661a..70e06e2a584accb3b4ecb369d11a401ae02e24a6 100644 (file)
@@ -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"
index a70faa0d75e87520939bf1997ed11adcaf9c7df6..800bd547b548186f7a6ec942c78632316acce8ff 100644 (file)
@@ -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/");
 
index 8a26c3fd8f16408446110e708062172aa51ddcfe..58c6dde436484cd2fecbfb36570013cee014f884 100644 (file)
@@ -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;
        }
index 09c8f28277e703c9844029209dc0b8f39a5abc85..4beb364c0ea24098f7a47ad0ba83a6340bf8690b 100644 (file)
@@ -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++) {
index 5db65ee99c8d4e9550da78d138d5a647ec8836c1..d411b26c1a58738892087c9230d42b0860007f41 100644 (file)
@@ -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;
index e1f361807283d4db70407f19e6de918026532602..3ab1ef03af4ca83afc9c3224b7f93de7ff97cbd9 100644 (file)
@@ -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++) {
index 3c27577b66634c435c3c75c46c6a8bc40afba440..d5b4aaae4366f15c76ca5e412f4f4a8d2f6c47b3 100644 (file)
@@ -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;
index e16d187162fd7574d32161fa3a4d9494f59dd59c..41431e091b3522f67643d583867364a9b81665fa 100644 (file)
@@ -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++) {
index deb8f55fce279a47da28073f2beae87b3228ca99..284db4518f161b61e91a53e19c9fa7293d385273 100644 (file)
@@ -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;
        }
index a9ca7e3e0a52d373f656c84049215b86ac7d0b8d..854f7727179feca3822dde7626bfec7b46e5f097 100644 (file)
@@ -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;
        }
index 219c06a665f6e9fa95b249dbba0416189fdf5739..01906501f1f07f460cf2509b3b2d13d7870c5a40 100644 (file)
@@ -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) {
index 8a764d0a65ee9989ef1b5f5fdd46dc2bc09bf38f..cd7e0867ee7430d1c7b6d7f7e3a0942a37ab43ad 100644 (file)
@@ -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;
index aab42864e026daac7475bb5d930f41829553012f..0f1d02b71019b3b9f52dd0c9863499d0b861a882 100644 (file)
@@ -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);
index c4370a812d8f0d3166cf8ae7224e6bc8679bae3f..82c1cdd42a9e8a0b545217ed90f3b9b371c8473b 100644 (file)
@@ -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);
 }
 
 /*
index ca7682f5d2e262830b8690016ecfd6e9d3ae0d18..e2e8161111d9e1bf93113138484dd8e3fd6ba37a 100644 (file)
@@ -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;
        }
index 386dac4ea373f2c726c423ff6deec95f3f507fe0..c405d2ff30f9ba9a962c4fdf87c1c129f2bb9741 100644 (file)
@@ -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;
        }
index c73a2e3d7b73377be37d3cbd2290b4bc516f8593..9075d4f3ac4467509e507f494808d5e86f654895 100644 (file)
@@ -241,7 +241,7 @@ void load_interfaces(void)
        }
        
 exit:
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 }
 
 
index 442b34bc13163a70e2ce84b84e13e424a08d5a9f..8385cef10823f67faad0650ecbf0c385c8d6a3b5 100644 (file)
@@ -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;
 }
index ef46dd61740b83b1558d64643cf3c09e9973c138..b11b24151e906f39548bd96054d0b073d9f0bbc9 100644 (file)
@@ -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;
 }
index 4af219facbfb1d0bb3eeb0a295e11fde63063cb9..bac0f43c20da8bc08a7dfe8092da63674e32c411 100644 (file)
@@ -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;
 }
index 47d8c760ab4d2c3775d8567546e50044ba587930..a912a42e55f8a6fa0ab7eb520442ae9d61c028d8 100644 (file)
@@ -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);
 
index e0d7b6e2cb7a36cfebb5b08fe1d9e4745a85d7c1..930ea9642e09f577cbab35f6c2c7deb79dfc6054 100644 (file)
@@ -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;
 }
 
index cd3be85a23e1f3d207d3bd21d734e94cff4f5218..88033a8a8b9df5c86d94beee11ee060ac2738b91 100644 (file)
@@ -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;
index c5ed9b2c8849743e3bbae93add9ccf72031a861a..d2809f644a2b399de35be7425ea58c34786e3b1e 100644 (file)
@@ -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) {
index 957039dea3f80b98bb11003174ba1503bb7c46e9..ff02f4d12bba48fb60aa4678792212b19665b808 100644 (file)
@@ -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;
index 62973a14ab438e265b1d9d68cdc91c7dd39de012..a81b9e5a425e4918a7c1e53aad285d50b832037d 100644 (file)
@@ -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;
index 8d88cafe59cf46fb56e0d85f7ecadb7d90ebb4b2..ceae3a427e410e0748ea004d04d3e8d7cc0940be 100644 (file)
@@ -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)));
index 1dd0e04561d3937a9ec20dc0589494534d4154d0..ac7dbca49bd3081b759d3ec3a23d4621ef5db369 100644 (file)
@@ -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;
 }
index a6beb2b484cbcc6d33cb0919a625d94daa2ad2da..f061f33bd3f41a8179ca172736e23fe463217fa7 100644 (file)
@@ -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)));
index d6b6bf7be4ec90a3dd0378ea273f43e43b047683..aaa5ce0fa24e54f667d39b39b3bb98e1cbe48fb1 100644 (file)
@@ -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;
index 27e452b14eb5810009d5e114612d3289bd65cdd5..1dd7fe8e9da60d0686238bb3eae4a28bc2c5da1c 100644 (file)
@@ -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;
index bdd68f9d9d99f7c8a4734a7dca7d15d31bd28650..e23aa0d97e9a55c169767ac699ea6fa4d73b18cd 100644 (file)
@@ -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;
index c65f490aebe727225597b0017aea953ef09bc858..a57f4359d3bfe55b4435965046cb6c55f5480ec0 100644 (file)
@@ -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) {
index 876698535bacb0ee39cd88dfc0f6e6d591b27e2c..7fe42f7ffce565ee21f39146bb990b1b6df73b06 100644 (file)
@@ -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);
index b3ec27de743e9b77f62e9377f0ef4e62e29d5623..d9c4e30d6aecb6283ba9dbdde15241218937db66 100644 (file)
@@ -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));
 
index bd4aea7c4100412ef8af59e53d1d030aa0301d5c..e589e6493ad98b2831a3bde8d22eee49f01d6a9b 100644 (file)
@@ -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;
        }
index e4b371e2d5b23aecef41e485d8c7980b6c42b9b3..d63d667777d8ee236a0c058608024644011a0088 100644 (file)
@@ -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;
 }
index 71cc8a531f39bc0d0fdc5972018d3368208b8252..7ae19219b4f1e29936514a2daa737b2787174d80 100644 (file)
@@ -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);
index 56a0d8013b2b8ee6ddc32a0d37cc50dcf6907a8c..0032f8c9ab2dc24b7901358a37260f0d592c25b8 100644 (file)
@@ -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
index 122f9510e78f6c169c2cea2601d1f398040906d0..051798c9f18cf74ef7c173e964d43b6016017ff5 100644 (file)
@@ -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.
index fb638a90000e7c239ce7f03911b74df07a3ee2be..e9dea6be33d44a2a87903111dbaab831d654ddb4 100644 (file)
@@ -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;
        }
index 80a17c1b6b2c1f55c5aa6fdbe8a2b37d1004fec7..43113412f722c40c0418656e3322f1a479c06c24 100644 (file)
@@ -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;
        }
index aaf892e1e6cf16ef0d0b5a6743cccf98dcac9373..e5bfd3865a4bf88e0295b998d87e9bc43830e322 100644 (file)
@@ -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;
        }
index ae97803ef7f278e211e0c0919edc9c5617f3bc05..59bab6ced2eefaedff829f93f3ae6519c91c9ba3 100644 (file)
@@ -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;
        }
index a9fb66d41e5f53235cbb12b68d5af7fa0fa5b0dd..d5ddcfbfb62f48068441d3e0b1cbc0091f499d20 100644 (file)
@@ -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;
index a713b9896d47e323b80724f586878fb9e70e5099..543f3d9b61d446d7d4b1af7a443e208896a42723 100644 (file)
@@ -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);
index 51b8690c97aed46412e0953003f6cd700766da52..92442234bda90fd2f633b5fb6550dd86c8e59b6a 100644 (file)
@@ -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;
        }
index 1e92a7d16e9c602ccd3b1705791668a483123e48..a61680c9d4bbc5e30bc18c89164b25b95be08272 100644 (file)
@@ -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;
        }
index 78a94a6a44ae76563669dbe3487e38e73bcf45fb..e48c32f0dab039d504033fb821ed2aecbc95e02d 100644 (file)
@@ -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, 
index 354840b84c5c27b3e87cb31c13b35f6082a3d639..263527ffc000b46b28d65cc5ef7c950f66bce091 100644 (file)
@@ -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);
        }
index 992d2c225da4a68950459ddb1f37f5ad7d90b493..0b9cac4c07c7014fa69b40a346b7198136f47dc0 100644 (file)
@@ -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;
        }
index 77fd760837ca1664625d4037da9e561f95157c04..0d69a386eb213abcedd612d2b5008a18d1ca5f72 100644 (file)
@@ -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;
 }
index eb2c671a95f5dbd582af1777942cc69f0ad1f9a1..6be92fa17d6b8221c9bcaef2d809342db190c01e 100644 (file)
@@ -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;
 }
index b2a6bd957a90c77a0494044b5c14f977a53f0f3c..eab94bb1949a01f65392c152bf7a3921d43e4fbd 100644 (file)
@@ -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;
                        }
index 84fd0f1d645dde4485c2e83d366b964158473dd3..c9e81ac28f47968f0958e5e37aa87361a69dd617 100644 (file)
@@ -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;
 }
index 809c75cf962c06cf2392f8127646a296de054293..a0249a4ba0a141aab26f2b411793cb350c4dff5a 100644 (file)
@@ -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;
index 97e021213727e88f935993aa38622bda9f6a355a..b2dac09f81142943456b36204e535a826e819f19 100644 (file)
@@ -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;
        }
index ec8bacdf6460882cffd73100bcf8bbaf85f50323..49be9a43e6405b45ca1ff66c69979fa3210b12d2 100644 (file)
@@ -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]);
index e0b54cacc3273dfd80bd3c4b6468d00803799b64..c6652125c248f61496675df9c1a83a65b9981c65 100644 (file)
@@ -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;
 }
index 3befb8ee4de20bbce9fec885373c556b8f62d0b0..88c2f0d0fccf0046c3872b91969ec851e129a068 100644 (file)
@@ -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;
 }
index 7fb12dcf80ceba385a6dbfbb2e05ee4c78c2bd4d..7dbe6b346819cc631e9c2285c8c0b3e13f7e84c1 100644 (file)
@@ -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;
        }
index 9576bdf35626937f83230bf98ce7d1ce325c0765..7934171ab0017c6b1a8df1c800e7b16a8dd0819f 100644 (file)
@@ -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;
 }
 
index d76f9fa2392bec46383df4f48484fd12368208c6..493ecab183fb6e1085776e9355c1786346ec677d 100644 (file)
@@ -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;
        }
index 509ec1f343db5ab7df5b0a399fb28bfc30041266..bbfee31fbe0c0221dc4dbea92436538f1267f91d 100644 (file)
@@ -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) {
index b9baf796df93f4a98858b6f23ffcfc3c2a959e0e..663c4f28bce1cbc1d9bef55f7691299df8e35b7d 100644 (file)
@@ -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);
 }
index de14eb0e578164eed1dd217e95fe8cbce8fbc99a..550450fea75254d8ebc42dfbdc71a73755aad5e6 100644 (file)
@@ -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;
index 40991a8855bf856ca3df7963ac845808a7fd46a3..0c0c64c0b42a3d545ec9ac6a214551f35adde702 100644 (file)
@@ -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;
index bd2aae3db111bf8ce76bd03901352d6221cc3c9b..7e2890272cce08d8ffa4bf0ec426869e3ed4b8f5 100644 (file)
@@ -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;
 }
index 1462a63dd2a4ca66d7ce205cb4d7b0c86d90024a..56b55426c0a4a9f776af8efa199248067d08bf89 100644 (file)
@@ -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;
 }
index 6d1003078dc678239a3195fdd3d8480e3f3ec5fc..bf8524c495c99b768ab72cbde2cd9d484acf7a68 100644 (file)
@@ -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;
index 20be3a9dce65e078410e4b1272241c8450819d66..fb75f0eaaf5a1d731db438e1c39df88c0a53ffe6 100644 (file)
@@ -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;
index 8a25e27cc152ac9ee28ee908fc00fe67e0a90ab5..6947cc8ee674be71f758d90b550e3db68a61b4d1 100644 (file)
@@ -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;
        }
index ee077dfd4f215e19f0007932f0eb5ac1b8fce40f..71a43a8fff7a1c41102decb914ff400ca2e56550 100644 (file)
@@ -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++;
                }
index e133c77d07f094f1f5d40ea3bb9c947673dd29d0..bdf9cb2581c983ac208efc2d522488cb1f5185f4 100644 (file)
@@ -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;
        }
index 0e218c478f1528ecf01ff07f1ed91c237a0a924a..7cd2d1654f19d75b4778d349ce7478a6e019ebc4 100644 (file)
@@ -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;
        }
index 14e9fe3a9c0222ff4d138159f14e54ae14f2ae2f..8d049ad9678e092608444aa5b80bd09965cf375d 100644 (file)
@@ -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;
        }
index a01832764dc7e25613388a2bffd84636ae9a2c8e..9fae7232ec94fcd25faa1734794cc07b741dc819 100644 (file)
@@ -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;
        }
index 7307b44cb821b5e27bcadb6650c0afb00a943b97..a05ad7c8975517a7933987dad4babfbe5855e67a 100644 (file)
@@ -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;
index cf6caebc7679839962ff5e565bc248b1b0dbcc80..7ac687dd460f625f93c3532eb016acf107195d12 100644 (file)
@@ -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; \
index 7b351f77b0c8ac7bbbe8edc5e34c6aaef7605efa..f51e3d0694a026878e773d8bdc085299d0759263 100644 (file)
@@ -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;
        }
index 57beba8c6873a44ab65896572f37d7160f69b6e7..0aa257073d36304549e3996cdb677aff8f4bf52d 100644 (file)
@@ -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;
        }
index 3254330c2f774368b88b47ac2ff196fdcbb5efe7..46e02b5da1fcdce2864e17c1575e29aea9437abc 100644 (file)
@@ -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;
        }
index aedb7acaef9f3d39f6f110ff449c7fe410054f6a..a61dbcb8527c7850782df2ddd220ebc009deebac 100644 (file)
@@ -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);
index 4875592ad69a0a008e19e94113e231af7a8a9d63..c69ba2d1687ee61c2ba005d875f5440a52e9f42a 100644 (file)
@@ -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++) {
index 560f4a646b53ac649d4601bfb43853e49bc82974..a1f03da367f375dbd7938090718c30a5fdb1f57c 100644 (file)
@@ -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;
        }
index 051e92b19cea33790878f458f6a1009e1861ce01..9b6c75e5c6510e615da9976a9a2f448b5ef91e6b 100644 (file)
@@ -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;
        }
index 41e1b04d49e774e7b40b1de8b1193579a683553e..e360321882bf33306930608d5dbe68679052fa9f 100644 (file)
@@ -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;
        }
index e38f2c9ecb2180851db736f4451a0c8db83788da..c2856ad2928e9dfe991eede3dd8263cd92011816 100644 (file)
@@ -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;
        }
index c2e8f826a2bef639deec0107170aad548766612b..1b60f174626ee64668aa919fab46b862b0e040c0 100644 (file)
@@ -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;
        }
index 74ee48ba15bbb536042972ad0a8867650c3e0d33..6ad654f505b602e151d9d4dc2027824a2f40e93b 100644 (file)
@@ -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;
                }
index b34d75d24d52c1ca98963dee08ab4428d6633544..ae8841e7b5ba34b493bcbf81076e5e50c9c2e719 100644 (file)
@@ -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;
        }
index 463574c8cffb786b56762041ebf252db007e2874..4b6afac00a8b11b3747695b4e26a2575e2097426 100644 (file)
@@ -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;
        }
index fc1576b955440a83d4495e952e14bb8a8f42d196..fc899c5fbca5c57e8b63875ea184d1e02b4761cc 100644 (file)
@@ -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;
        }
index 21067587849f2b4fcbd0f91fcc4ca6485ac7e93a..76c1996ec736c84da2a28847032cfbda39e28150 100644 (file)
@@ -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;
        }
index 9934388461ff35ab38afa2c893b7601d63b5a3b7..9bc51d1ef438f39a74a61561b5605f1ac27c12c0 100644 (file)
@@ -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) {
index 98cd4a99f60b0716303a433d4e0beecceaf35859..59a3d34640724931ac0627ad14955df1352cc369 100644 (file)
@@ -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;
        }
index e92732b810ffa01f16ef9bd1b22c783b65ba5e3b..c9f2fcae290b79474573198f0a34bb3c20d82e9e 100644 (file)
@@ -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;
        }
index da36ac2239a221e8d29855dc473d908836c85fa9..c8d696f0fc5867f3ade80eeb06b1cc0a743609f9 100644 (file)
@@ -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;
        }
index 0b642adb017357af8cc0638d02370ebfb0084f2e..314f9736a367c37a0f8fe2e3f393ee5306a6b7c5 100644 (file)
@@ -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;
        }
index eebae38ab790b2bf56fdad9c94ae0d4a97c9a1b0..0184244aa81b82a12744a7c2c86627c766dff266 100644 (file)
@@ -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;
        }
index cfe846a828a09d1c20f74f0fbf72c07ec21a1faf..c44a5274583e9ad51187614a58990166c7980364 100644 (file)
@@ -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;
index 57d626465a782fbf236ed841131a60e37e5bfdd6..ace0ad896f91dde8f6878342cc54ba91bf1235ce 100644 (file)
@@ -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;
        }
index a1a5244453080760a0d65a658230db0772a8842c..9915660d9be49c31f023f67be9831303f384cdb7 100644 (file)
@@ -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;
        }
index 0582d5551185eb4edcbd81ea254b3319ab50bc1c..8380fccaf73a2f432b4e49784b18b6ff6de94b60 100644 (file)
@@ -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;
index 40335e42463b744221c9dfa2f4985294748f8a22..575c073e468573e02557c878c61a0c5996a6b0aa 100644 (file)
@@ -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;
        }
index 561482a5fea67985ec665e0728130ae6112fb57f..222f513bb9722e7f3e6ce56cb776fbf4a38004a9 100644 (file)
@@ -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;
        }
 
index 62c879408f423441d6b59b53b32c4ef42d6291d5..f1cd916dcbb76af201a95b6b90f47733a67ae351 100644 (file)
@@ -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;
        }
index 30e508d65ba5fa1add76e0f8e92988e883e0a4a8..506417d7e4e613e16b01ceb5cd2bd39d568162e2 100644 (file)
@@ -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++) {
index 04fb7c73a56aef77cdcc6798ca19bf6b2e5669fc..f36eaf20d1dccc4b4953d734b7765fee4df5c4b3 100644 (file)
@@ -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);
 }
 
 
index 508a2dec5e20f3d0eeb6cf075a5a20ad7a0be1c7..6a1ccb00d5817cb60510774fe6d2f7c9686eff21 100644 (file)
@@ -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);
index 2ebdd59cfecb32d1618a280390f96493eaff1601..1e77ae020a23fe4df2fa8da736be2e4c72772b43 100644 (file)
@@ -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++) {
index dd6554b9f7136fa7859bf962dcaaddeb1a0390c3..2be7c684a4db6b3265d82f42c72ec3ac51679424 100644 (file)
@@ -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) {
index b793cd4da710a908a469bc45f2658aea785a7765..009fa1aa6d8e2b2aaaa3dddd895cfaeba4747df2 100644 (file)
@@ -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;
        }
index 98992de74aebe027bc32c18436031d12efa83131..797dcc624e322afb0230c35781a0b9e3920072d5 100644 (file)
@@ -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;
        }
index df9213bfd3ad8e59baf9aafa4f1c2632565f641e..b203f45e4e1422a8e9fedd5bba79d8e331adbf4f 100644 (file)
@@ -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;
        }
index ff33d52d01bcaf6337be191bfea72f9b5e9788cf..c23bbe94d0f873e896d325719fc057f91a1e3d62 100644 (file)
@@ -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;
index 6ef1c66714ca0f878e33123b6d2503f88cb5508e..665d778ec9646ee62405b015b81bd4489587dbdc 100644 (file)
@@ -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;
        }
index 56f7152c143d00af76aade0c578a92b9a5572442..a0bffcce065cadc7371d8697a3d49a66bcc654e9 100644 (file)
@@ -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;
        }
index 1464ef03079cb0462fd69606a79990c95b3f0d8d..b1e96591985c03698d544ca77ec950e6d192d240 100644 (file)
@@ -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;     
        }
index c3ec8bf80f55850fd1eaf14570d177fde7ec7ba6..0bc44c410bf7df9cf67ee96501a082fc523b9ab0 100644 (file)
@@ -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;
index 085fe450acb8cb33620d686541d81fb7e7ddd70c..ae20de16233438a487c4bfac9dc87a3afb1d7f2d 100644 (file)
@@ -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;
index ff0a5641b7e322e8037c59859f5dd19681d5e45a..8bb6a5c60fa8e5fb91cd3806a97fe5c43d1ba01a 100644 (file)
@@ -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;
        }
index 57afa4530e5c2aa7cf0164f47f505e0d3a9a87b5..3362d2f4d1d1cecd42562a4874e481e023a1d114 100644 (file)
@@ -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;
index 58bee5e18b41b2b696fda0dfb7d7022a8f9f41ce..c0da3cbb1139c5fee9bf172ebb5cdd5f08178a2c 100644 (file)
@@ -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;
index 82de29e44e3595073420ffbcafd249fd7899f759..793b86d9dce09b780f773a96d94d7c85d27083b9 100644 (file)
@@ -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;
index c70ed95915c1f05640eb7f9ca0419e5aced257fb..427add0aa23f3405a4cba85ea9ddd43ef9544215 100644 (file)
@@ -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);
index 58755542586751f5259db3e8a2015e4c767ef021..9a3b919d8ba953849fde09516f100cdaf2987ced 100644 (file)
@@ -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;
index 91a9eac3c7f52f947787b7dba9f704dc921c96e8..3d7723936d3f3e4c7c191cea964174a700d53c62 100644 (file)
@@ -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;
        }
 
index f7f39f39d5925f8ddae759f5d78a381403eee224..c2aca046616027e792dcf7e11cbe7be49095eab7 100644 (file)
@@ -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;
index 1cbc831a173cdfac6b5ff88aeb9d873948695f1d..394923635d5c66aa9728b17018b52b28b922bb2d 100644 (file)
@@ -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 */
index 2b9573383fcd0a3b9ba68665c30b2af2f1a47fd9..a1033e94762cef0f7b8881922e8283d9c083c9d3 100644 (file)
@@ -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);
index 378ca1914d50bdf8eaeb4001809a1fe663ce9405..2d532b638d532630bcfdbe0da62f8ae4e8b8ded1 100644 (file)
@@ -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;
        }
 
index 018bfd9f1a29cfa21447c702b546bc61ed542e51..edea3d963eb869d749a6d8a0e9b988b7c3d6de66 100644 (file)
@@ -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);
 }
 
 
index 51fe2814e2e2c691a6b5dc8108b7071db84f074b..27a7c92eed1833f4d3122060b78be2e43785d0e3 100644 (file)
@@ -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;
 }
index 898fc41b4e42d9c349b675724caeba1be1691156..2a302ae3f6ddaeee387ea0e7214d8acae8353292 100644 (file)
@@ -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;
 }
index 4a92b5f31a1c848ddae3176cf3a55813774f722c..b1bbdf1cd1784fb9936a8ee80f2b4a2720a74968 100644 (file)
@@ -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;
 }
index 102a3f0dab360028a9f805d3b8e845076c552d79..4e9ae1be28dac774fca061a73e090b702b33d0ad 100644 (file)
@@ -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);
 
index 46514a6a43f7b780ac4a066b1613ee72d2739f1a..87d49c6ce5fd1d720bf4e68dee44e9d2da24c96a 100644 (file)
@@ -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)) {
index 8b1aca05f413aa3fefd10384c1769b40d47511fe..99f79c8c50c368e6494bc2917c3b3aeda98c21a3 100644 (file)
@@ -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);
 
index abf4555a229896031a06c44c02fcceffeb8e2316..66e8a5350f739619fe7f60a25cb4d3f482e1da54 100644 (file)
@@ -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;
 }
index b83234be9190c9772045ffb0d2fba0ac86972e23..1864c82fdcba9c2af2b54cd467981ad05dd06c60 100644 (file)
@@ -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);
 
index b176de92c8c3942eb7194ffe3d765689643d6212..b68564aa2ed14d70872b251f4b98512301e24ed7 100644 (file)
@@ -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;
 }
index cc99b40050acc21a05f6cb58681a01d05e0af6ac..fd1ea0f34092e2b12c06dbb4cdd42baab40e1ecc 100644 (file)
@@ -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;
 }
index a59fa1af9bf32f930f3dd78117f857707be88669..191b3240d1f84dbcb604b3f9263dc88a9f7ae6d5 100644 (file)
@@ -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;
 }
index f6884f37c91ecd50f51bf37f75895a8744d74482..5f2b7040d997a1bd6c2cd312df8e81484874e8c6 100644 (file)
@@ -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;
 }
index 38941b8c5620885154c803f243cdc5dadfc07e36..d32c9393c29fb0993755a8ccf6f8bb690c162dc9 100644 (file)
@@ -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;
 }
index 5b6a2dd2ad2e77b7c4fe001a4e38e41cb63c3903..cdf8388e93c542e3751368417f26d7ee54e7d3b2 100644 (file)
@@ -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;
 }
index 2361091a9baaba0b68a8d2a109e03b1bfca35481..a74237146fe788d4af2f992af8dc4d035a00e12f 100644 (file)
@@ -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;
 }
index f050d220eb27e24e9ea5afce17b1c8ebaf8c83e5..70a0b2b528a89a85a03d49954e11eb9a89054943 100644 (file)
@@ -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;
 }
index 478c0a5a4292d4dd911747425f05681203833371..f2cd5b7cf715c48fcfcb2a2fbcfecb9b5ce9d688 100644 (file)
@@ -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;
 }
index eea5b20ffa55b59390930ccd3c668d1e9dae3d4e..5cdc839194d630160603e738e5d2fc6ef1f3699d 100644 (file)
@@ -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;
 }
index fce036a5e6cb2902038d9a8f29a6774bf6ecf549..e8f7e4a7121ec14d154681538dd05d59f6b9a129 100644 (file)
@@ -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;
 }
index 2a5a0ca074a9fc451458d6977df7a88a4c89de69..0877931d06610dacb386c10f407ae1b649606ff6 100644 (file)
@@ -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;
 }
index 3fa248e0a49927e5b408dad434ea0c58dac85293..17a7f18505abc5b1d7722ab6b9c5e99ce9b90512 100644 (file)
@@ -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;
 }
index 9dcf6341c0d4d67a1fa9179f7ae25733b5179dcb..b167cb0903d60195102920e059e775128d93c0b8 100644 (file)
@@ -345,6 +345,6 @@ BOOL torture_raw_oplock(void)
        }
 
        torture_close_connection(cli1);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index d398026a18d476180ea11f31bed7a7eef1b1e8b7..9a1a8a1144a33f716efc30c42e489254e5e3f88b 100644 (file)
@@ -711,6 +711,6 @@ done:
        smbcli_unlink(cli->tree, fname);
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index d302435a6c6f2030ddf7514d6fb663e5be9dc792..258f127d61d29fde97df06250c427a1c153eea4a 100644 (file)
@@ -292,6 +292,6 @@ BOOL torture_raw_qfsinfo(void)
 
 done:
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index fb2e2ddec21fdc062fed8883e5ff928e24e9a5db..e8e305d01c17cfb72bb1019d33c3288ee512b30c 100644 (file)
@@ -737,6 +737,6 @@ BOOL torture_raw_read(void)
        }
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index 3d71790736610d4c93e860420ead4ad28127e96d..42f5903508c670e901e231d20e8abcbaa0df6331 100644 (file)
@@ -430,6 +430,6 @@ BOOL torture_raw_rename(void)
        }
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index 84466d0cdeb5f01c7b41f6d73c746a7d038af17e..be54aecb3dd913eccebd4d36bff0a457844d98ea 100644 (file)
@@ -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;
 }
index 716a73b8f777902cf719d82da0a019285803f5ba..0d34c831a52c7f90d6a302eeba857eb2684ca587 100644 (file)
@@ -246,6 +246,6 @@ BOOL torture_raw_seek(void)
        }
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index 53fbf5a0f3de3ead017dd392007ca5ae721df90f..cbfb6aa6a155965ed30c0f4f069e10d60990714c 100644 (file)
@@ -510,7 +510,7 @@ done:
        }
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
 
index dd03e1a1251a34d5f35f8e2fe820430fdfd94b21..54c83de89634f84a923ab9402afa5fa6372b8633 100644 (file)
@@ -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;
 }
index d9c7ac6dfabbcbef8297746d09fd95ee16b77bd7..1c8c35d72fdc6fd0c1bd1ddd372ac988c68d8758 100644 (file)
@@ -183,6 +183,6 @@ BOOL torture_raw_unlink(void)
        }
 
        torture_close_connection(cli);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return ret;
 }
index 698520258dd331464b96e08bf0e84768dfce990f..7241f8c91a52e355dfc49b4d94c27942fe902661 100644 (file)
@@ -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;
 }
index 600b51d15bdd9da0fff7bc7ce824c59fcf17245e..79135ba01837d021e9372af99111cae3172a7f40 100644 (file)
@@ -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);
 
index 3d28fa775e26254b541d9ef1bd946d4210580106..fd29a9228b23e89b7e460f7b891d493c23f5612a 100644 (file)
@@ -158,7 +158,7 @@ BOOL torture_rpc_atsvc(void)
                return False;
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
         torture_rpc_close(p);
 
index fe0e29521a90b9de85d53d4679504f1e6b06bce4..d6265361696bad0564bd9a08cb661964221bcd01 100644 (file)
@@ -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;
index f44ce96658735ad16aa5523ac5d9e14b5254225a..f8bcf4096575e539f458006b24507a3c7fa8ea2d 100644 (file)
@@ -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;
index dd3227c2c16ee284ae2e7ce40acff4e2c46f99e4..358b94fa721ccd55b334553192578b9aeb1af03f 100644 (file)
@@ -195,7 +195,7 @@ BOOL torture_rpc_dfs(void)
                ret = False;
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
         torture_rpc_close(p);
 
index 4821d67d9c0d800f736ca1f77f2dd66c8e692902..f386c84a91e3e957869c03e900b84916021167e0 100644 (file)
@@ -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);
 
index bafe562cdbde13f55798aad43ca438e9ebf30db1..bd20a695e2878e6461b70a1a975b3f0118089e8e 100644 (file)
@@ -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);
 
index 1f3c8968ca1cc0082405fcab6375067b7f6b52d0..4fcd0757f007ed9d5cf6d8fadbf7cfd8ae52df40 100644 (file)
@@ -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);
 
index 91e012cdec7728135008c26845fb388441340ce0..7e320200f0619e007d68897ef09febb9756b3176 100644 (file)
@@ -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);
 
index 2c802ea5deb3e17f8c4109883822f09cf5688aa5..089f58dc9915e9d171db6ce74c50b18066dac34b 100644 (file)
@@ -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);
 
index 3da539aea5b464a7952d356b8c3ac5012eb9badc..0d7acd28758ba12551091473ed22527fb187b1c7 100644 (file)
@@ -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);
 
index 18493029298bed8ea0f17062834f2a1d63f1b50c..b565d5de7610f2c1e2e400e42a6e51804f925917 100644 (file)
@@ -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);
 
index 897dd78255443150fd9d498344c114fc6b976e5e..aaef981fdbb70fbd7cfdf18c8bc39a05ba69767b 100644 (file)
@@ -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);
 
index afb30b1987613224a89bfc47cf2020a83bb8aca6..1c7e3e03501a5b329027ef09fc79879e68bbf3c7 100644 (file)
@@ -1297,7 +1297,7 @@ BOOL torture_rpc_samlogon(void)
        }
 
 failed:
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        torture_rpc_close(p);
 
index 5d20587d26ce1f1e3be2565be23e580489f6028a..fa64b556ef8e8115aaeaf8e7b2ecfe797e0be577 100644 (file)
@@ -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);
 
index 2efb16222b1a9060e82f28f118380c0b577b60a1..f7800e28ccbc0e9b37cde2ccedfa2ce66c7c69e7 100644 (file)
@@ -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;
 }
index 6f2edf9f47580c778b61e82ff6deda0d8691924d..c11a004e335b986235fa11801b21e54dfb89fb0d 100644 (file)
@@ -1054,7 +1054,7 @@ BOOL torture_rpc_spoolss(void)
                ret = False;
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
         torture_rpc_close(p);
 
index 4cc7dc6291d488eecce5d09e33d08902d765b80d..4b1305b7b6b66d87d554462cc6be21972a7aa952 100644 (file)
@@ -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);
 
index 256f92b974fc0811064f8a86bdb7e3bc05797ad6..cadc80a41757ac34351ade92bd6845025e85508e 100644 (file)
@@ -137,7 +137,7 @@ BOOL torture_rpc_svcctl(void)
                ret = False;
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
     torture_rpc_close(p);
 
index d034446adbae101470593bc44bc24aa4cf7485b4..626bb666c17b98500310215726e01406ccd191c9 100644 (file)
@@ -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;
        }
index 9e24a9f05552144b276f6cee1e19a7d68c88c28e..f2d79fffa0e0648b413a20053934814612b0abeb 100644 (file)
@@ -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);
 
index baa1f6bfd88d96d29a368996398e61cf0d6883ee..f3a3ec233c2da93c3d8fc6bb179279d7ee70bb9c 100644 (file)
@@ -109,7 +109,7 @@ BOOL torture_rpc_wkssvc(void)
                ret = False;
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
         torture_rpc_close(p);
 
index 3c4a881d96a1b3fe83dd2606300099fdec792ed4..89154179953f0923f635b8edc48c02cd0ddbdacb 100644 (file)
@@ -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;
 }
index e41e1835371ad77a0b18f2cd6cf89edb83c5b862..2a0e344c0943ec3157e8437f5ee085ba9abdd92e 100644 (file)
@@ -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);
 }
 
index 3df1f3be41cd4474aa0269b4c915f671a4e3ac7b..c1e35cf3effcaad50fc107e107a8e8ccb1f6f1a2 100644 (file)
@@ -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;
 }
index 350ec251d9e9b8d90eb9b3d25cd6d3f60af51d15..7b716f0916314eeba97c5ca79078290b99e1ab90 100644 (file)
@@ -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;
 }
 
index 804c8d3c17d5858b9c8227d912580a139040f023..b5e3f3b3ea34ec6757953261dc4266f4d7abe088 100644 (file)
@@ -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',