summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/smb_macros.h1
-rw-r--r--source3/lib/bitmap.c2
-rw-r--r--source3/lib/ctdbd_conn.c4
-rw-r--r--source3/lib/dbwrap_ctdb.c2
-rw-r--r--source3/lib/dbwrap_file.c6
-rw-r--r--source3/lib/dbwrap_tdb.c2
-rw-r--r--source3/lib/messages_ctdbd.c4
-rw-r--r--source3/lib/messages_local.c2
-rw-r--r--source3/lib/netapi/share.c4
-rw-r--r--source3/lib/smbldap.c4
-rw-r--r--source3/libads/ldap_schema.c2
-rw-r--r--source3/libsmb/libsmb_xattr.c2
-rw-r--r--source3/libsmb/namequery.c2
-rw-r--r--source3/libsmb/samlogon_cache.c2
-rw-r--r--source3/locking/brlock.c2
-rw-r--r--source3/locking/locking.c6
-rw-r--r--source3/locking/posix.c8
-rw-r--r--source3/modules/vfs_afsacl.c4
-rw-r--r--source3/modules/vfs_notify_fam.c2
-rw-r--r--source3/modules/vfs_scannedonly.c4
-rw-r--r--source3/param/service.c2
-rw-r--r--source3/passdb/pdb_get_set.c2
-rw-r--r--source3/passdb/pdb_ipa.c2
-rw-r--r--source3/passdb/pdb_ldap.c2
-rw-r--r--source3/passdb/secrets.c2
-rw-r--r--source3/printing/notify.c8
-rw-r--r--source3/printing/print_cups.c2
-rw-r--r--source3/registry/reg_objects.c4
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c4
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c24
-rw-r--r--source3/smbd/conn.c4
-rw-r--r--source3/smbd/dfree.c2
-rw-r--r--source3/smbd/ipc.c2
-rw-r--r--source3/smbd/msdfs.c6
-rw-r--r--source3/smbd/notify.c2
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/posix_acls.c2
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/smb2_read.c2
-rw-r--r--source3/smbd/trans2.c4
-rw-r--r--source3/torture/nbench.c2
-rw-r--r--source3/torture/vfstest.c2
-rw-r--r--source3/utils/net_rpc_shell.c4
-rw-r--r--source3/utils/net_usershare.c2
-rw-r--r--source3/utils/netlookup.c2
-rw-r--r--source3/winbindd/winbindd_cache.c4
-rw-r--r--source3/winbindd/winbindd_cred_cache.c2
47 files changed, 81 insertions, 82 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index e21977f748..a51e9ec407 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -219,7 +219,6 @@ copy an IP address from one buffer to another
#define SMB_XMALLOC_ARRAY(type,count) (type *)smb_xmalloc_array(sizeof(type),(count))
#define TALLOC(ctx, size) talloc_named_const(ctx, size, __location__)
-#define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
#define TALLOC_MEMDUP(ctx, ptr, size) _talloc_memdup(ctx, ptr, size, __location__)
#define TALLOC_ZERO(ctx, size) _talloc_zero(ctx, size, __location__)
#define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
diff --git a/source3/lib/bitmap.c b/source3/lib/bitmap.c
index bd56b4aad1..0acfcd8813 100644
--- a/source3/lib/bitmap.c
+++ b/source3/lib/bitmap.c
@@ -29,7 +29,7 @@ struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
{
struct bitmap *bm;
- bm = TALLOC_P(mem_ctx, struct bitmap);
+ bm = talloc(mem_ctx, struct bitmap);
if (!bm) return NULL;
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index f42290695a..ecc331aa6a 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -304,7 +304,7 @@ static struct messaging_rec *ctdb_pull_messaging_rec(TALLOC_CTX *mem_ctx,
cluster_fatal("got invalid msg length");
}
- if (!(result = TALLOC_P(mem_ctx, struct messaging_rec))) {
+ if (!(result = talloc(mem_ctx, struct messaging_rec))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
@@ -433,7 +433,7 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
goto next_pkt;
}
- msg_state = TALLOC_P(NULL, struct deferred_msg_state);
+ msg_state = talloc(NULL, struct deferred_msg_state);
if (msg_state == NULL) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(hdr);
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index 298f4c16a5..d5daba13e5 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -1371,7 +1371,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
return NULL;
}
- if (!(db_ctdb = TALLOC_P(result, struct db_ctdb_ctx))) {
+ if (!(db_ctdb = talloc(result, struct db_ctdb_ctx))) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(result);
return NULL;
diff --git a/source3/lib/dbwrap_file.c b/source3/lib/dbwrap_file.c
index e195d6f6f3..c27df0cdb9 100644
--- a/source3/lib/dbwrap_file.c
+++ b/source3/lib/dbwrap_file.c
@@ -80,12 +80,12 @@ static struct db_record *db_file_fetch_locked(struct db_context *db,
SMB_ASSERT(ctx->locked_record == NULL);
again:
- if (!(result = TALLOC_P(mem_ctx, struct db_record))) {
+ if (!(result = talloc(mem_ctx, struct db_record))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
- if (!(file = TALLOC_P(result, struct db_locked_file))) {
+ if (!(file = talloc(result, struct db_locked_file))) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(result);
return NULL;
@@ -353,7 +353,7 @@ struct db_context *db_open_file(TALLOC_CTX *mem_ctx,
return NULL;
}
- if (!(ctx = TALLOC_P(result, struct db_file_ctx))) {
+ if (!(ctx = talloc(result, struct db_file_ctx))) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(result);
return NULL;
diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c
index 98fd255ece..0342725772 100644
--- a/source3/lib/dbwrap_tdb.c
+++ b/source3/lib/dbwrap_tdb.c
@@ -347,7 +347,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
goto fail;
}
- result->private_data = db_tdb = TALLOC_P(result, struct db_tdb_ctx);
+ result->private_data = db_tdb = talloc(result, struct db_tdb_ctx);
if (db_tdb == NULL) {
DEBUG(0, ("talloc failed\n"));
goto fail;
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 70f29b795e..b9ee049d01 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -105,12 +105,12 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
struct messaging_ctdbd_context *ctx;
NTSTATUS status;
- if (!(result = TALLOC_P(mem_ctx, struct messaging_backend))) {
+ if (!(result = talloc(mem_ctx, struct messaging_backend))) {
DEBUG(0, ("talloc failed\n"));
return NT_STATUS_NO_MEMORY;
}
- if (!(ctx = TALLOC_P(result, struct messaging_ctdbd_context))) {
+ if (!(ctx = talloc(result, struct messaging_ctdbd_context))) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(result);
return NT_STATUS_NO_MEMORY;
diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c
index 9bfe6e68e0..bfed35ffe4 100644
--- a/source3/lib/messages_local.c
+++ b/source3/lib/messages_local.c
@@ -87,7 +87,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
struct messaging_backend *result;
struct messaging_tdb_context *ctx;
- if (!(result = TALLOC_P(mem_ctx, struct messaging_backend))) {
+ if (!(result = talloc(mem_ctx, struct messaging_backend))) {
DEBUG(0, ("talloc failed\n"));
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/lib/netapi/share.c b/source3/lib/netapi/share.c
index c4ed1549ce..d12fa1cf0c 100644
--- a/source3/lib/netapi/share.c
+++ b/source3/lib/netapi/share.c
@@ -141,7 +141,7 @@ static NTSTATUS map_SHARE_INFO_buffer_to_srvsvc_share_info(TALLOC_CTX *mem_ctx,
case 2:
i2 = (struct SHARE_INFO_2 *)buffer;
- s2 = TALLOC_P(mem_ctx, struct srvsvc_NetShareInfo2);
+ s2 = talloc(mem_ctx, struct srvsvc_NetShareInfo2);
NT_STATUS_HAVE_NO_MEMORY(s2);
s2->name = i2->shi2_netname;
@@ -159,7 +159,7 @@ static NTSTATUS map_SHARE_INFO_buffer_to_srvsvc_share_info(TALLOC_CTX *mem_ctx,
case 1004:
i1004 = (struct SHARE_INFO_1004 *)buffer;
- s1004 = TALLOC_P(mem_ctx, struct srvsvc_NetShareInfo1004);
+ s1004 = talloc(mem_ctx, struct srvsvc_NetShareInfo1004);
NT_STATUS_HAVE_NO_MEMORY(s1004);
s1004->comment = i1004->shi1004_remark;
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 1632cd2feb..c49788459b 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -474,7 +474,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
return;
}
- handle = TALLOC_P(mem_ctx, LDAPMessage *);
+ handle = talloc(mem_ctx, LDAPMessage *);
SMB_ASSERT(handle != NULL);
*handle = result;
@@ -494,7 +494,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
return;
}
- handle = TALLOC_P(mem_ctx, LDAPMod **);
+ handle = talloc(mem_ctx, LDAPMod **);
SMB_ASSERT(handle != NULL);
*handle = mod;
diff --git a/source3/libads/ldap_schema.c b/source3/libads/ldap_schema.c
index df13b08f4a..7368be830f 100644
--- a/source3/libads/ldap_schema.c
+++ b/source3/libads/ldap_schema.c
@@ -252,7 +252,7 @@ ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
return ADS_ERROR(LDAP_NO_MEMORY);
}
- if ( (schema = TALLOC_P(mem_ctx, struct posix_schema)) == NULL ) {
+ if ( (schema = talloc(mem_ctx, struct posix_schema)) == NULL ) {
TALLOC_FREE( ctx );
return ADS_ERROR(LDAP_NO_MEMORY);
}
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 56fe06435c..eeff9a9030 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -561,7 +561,7 @@ dos_attr_query(SMBCCTX *context,
SMB_INO_T inode = 0;
DOS_ATTR_DESC *ret;
- ret = TALLOC_P(ctx, DOS_ATTR_DESC);
+ ret = talloc(ctx, DOS_ATTR_DESC);
if (!ret) {
errno = ENOMEM;
return NULL;
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f5f4a7c1dc..511eba4cbf 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2479,7 +2479,7 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
*return_ss_arr = NULL;
if (is_ipaddress(name)) {
- *return_ss_arr = TALLOC_P(ctx, struct sockaddr_storage);
+ *return_ss_arr = talloc(ctx, struct sockaddr_storage);
if (!*return_ss_arr) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index 01a5282751..a07ea5280a 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -149,7 +149,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
/* Prepare data */
- if (!(mem_ctx = TALLOC_P( NULL, int))) {
+ if (!(mem_ctx = talloc( NULL, int))) {
DEBUG(0,("netsamlogon_cache_store: talloc() failed!\n"));
return false;
}
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 220688c7e7..9a9fd15789 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1823,7 +1823,7 @@ static struct byte_range_lock *brl_get_locks_internal(TALLOC_CTX *mem_ctx,
files_struct *fsp, bool read_only)
{
TDB_DATA key, data;
- struct byte_range_lock *br_lck = TALLOC_P(mem_ctx, struct byte_range_lock);
+ struct byte_range_lock *br_lck = talloc(mem_ctx, struct byte_range_lock);
bool do_read_only = read_only;
if (br_lck == NULL) {
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 55412ec8b2..153f3da585 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -973,7 +973,7 @@ struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
struct file_id tmp;
TDB_DATA key = locking_key(&id, &tmp);
- if (!(lck = TALLOC_P(mem_ctx, struct share_mode_lock))) {
+ if (!(lck = talloc(mem_ctx, struct share_mode_lock))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
@@ -1004,7 +1004,7 @@ struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
TDB_DATA key = locking_key(&id, &tmp);
TDB_DATA data;
- if (!(lck = TALLOC_P(mem_ctx, struct share_mode_lock))) {
+ if (!(lck = talloc(mem_ctx, struct share_mode_lock))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
@@ -1483,7 +1483,7 @@ static struct security_unix_token *copy_unix_token(TALLOC_CTX *ctx, const struct
{
struct security_unix_token *cpy;
- cpy = TALLOC_P(ctx, struct security_unix_token);
+ cpy = talloc(ctx, struct security_unix_token);
if (!cpy) {
return NULL;
}
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 2e590413f8..51151df9a4 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -892,7 +892,7 @@ BECOMES.....
| l_curr| | l_new |
+-------+ +---------+
**********************************************/
- struct lock_list *l_new = TALLOC_P(ctx, struct lock_list);
+ struct lock_list *l_new = talloc(ctx, struct lock_list);
if(l_new == NULL) {
DEBUG(0,("posix_lock_list: talloc fail.\n"));
@@ -1000,7 +1000,7 @@ bool set_posix_lock_windows_flavour(files_struct *fsp,
return False;
}
- if ((ll = TALLOC_P(l_ctx, struct lock_list)) == NULL) {
+ if ((ll = talloc(l_ctx, struct lock_list)) == NULL) {
DEBUG(0,("set_posix_lock_windows_flavour: unable to talloc unlock list.\n"));
talloc_destroy(l_ctx);
return False;
@@ -1119,7 +1119,7 @@ bool release_posix_lock_windows_flavour(files_struct *fsp,
return False;
}
- if ((ul = TALLOC_P(ul_ctx, struct lock_list)) == NULL) {
+ if ((ul = talloc(ul_ctx, struct lock_list)) == NULL) {
DEBUG(0,("release_posix_lock_windows_flavour: unable to talloc unlock list.\n"));
talloc_destroy(ul_ctx);
return False;
@@ -1281,7 +1281,7 @@ bool release_posix_lock_posix_flavour(files_struct *fsp,
return False;
}
- if ((ul = TALLOC_P(ul_ctx, struct lock_list)) == NULL) {
+ if ((ul = talloc(ul_ctx, struct lock_list)) == NULL) {
DEBUG(0,("release_posix_lock_windows_flavour: unable to talloc unlock list.\n"));
talloc_destroy(ul_ctx);
return False;
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 658f3be179..2ef6adf953 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -89,7 +89,7 @@ static void free_afs_acl(struct afs_acl *acl)
static struct afs_ace *clone_afs_ace(TALLOC_CTX *mem_ctx, struct afs_ace *ace)
{
- struct afs_ace *result = TALLOC_P(mem_ctx, struct afs_ace);
+ struct afs_ace *result = talloc(mem_ctx, struct afs_ace);
if (result == NULL)
return NULL;
@@ -167,7 +167,7 @@ static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx,
}
}
- result = TALLOC_P(mem_ctx, struct afs_ace);
+ result = talloc(mem_ctx, struct afs_ace);
if (result == NULL) {
DEBUG(0, ("Could not talloc AFS ace\n"));
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c
index a4e7fd1e2b..1f76a05fc0 100644
--- a/source3/modules/vfs_notify_fam.c
+++ b/source3/modules/vfs_notify_fam.c
@@ -249,7 +249,7 @@ static NTSTATUS fam_watch(vfs_handle_struct *vfs_handle,
fam_connection_initialized = True;
}
- if (!(watch = TALLOC_P(ctx, struct fam_watch_context))) {
+ if (!(watch = talloc(ctx, struct fam_watch_context))) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c
index a47d875b64..6d748c4c23 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -516,7 +516,7 @@ static SMB_STRUCT_DIR *scannedonly_opendir(vfs_handle_struct * handle,
return NULL;
}
- sDIR = TALLOC_P(NULL, struct scannedonly_DIR);
+ sDIR = talloc(NULL, struct scannedonly_DIR);
if (fname[0] != '/') {
sDIR->base = construct_full_path(sDIR,handle, fname, true);
} else {
@@ -544,7 +544,7 @@ static SMB_STRUCT_DIR *scannedonly_fdopendir(vfs_handle_struct * handle,
fname = (const char *)fsp->fsp_name->base_name;
- sDIR = TALLOC_P(NULL, struct scannedonly_DIR);
+ sDIR = talloc(NULL, struct scannedonly_DIR);
if (fname[0] != '/') {
sDIR->base = construct_full_path(sDIR,handle, fname, true);
} else {
diff --git a/source3/param/service.c b/source3/param/service.c
index 1545ef0171..358b7af2de 100644
--- a/source3/param/service.c
+++ b/source3/param/service.c
@@ -266,7 +266,7 @@ struct share_params *get_share_params(TALLOC_CTX *mem_ctx,
return NULL;
}
- if (!(result = TALLOC_P(mem_ctx, struct share_params))) {
+ if (!(result = talloc(mem_ctx, struct share_params))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 782c08fc1c..eec82f9c98 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -511,7 +511,7 @@ bool pdb_set_group_sid(struct samu *sampass, const struct dom_sid *g_sid, enum p
if (!g_sid)
return False;
- if ( !(sampass->group_sid = TALLOC_P( sampass, struct dom_sid )) ) {
+ if ( !(sampass->group_sid = talloc( sampass, struct dom_sid )) ) {
return False;
}
diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c
index 556283dc6b..02f7bb6888 100644
--- a/source3/passdb/pdb_ipa.c
+++ b/source3/passdb/pdb_ipa.c
@@ -693,7 +693,7 @@ static NTSTATUS ipasam_enum_trusteddoms(struct pdb_methods *methods,
for (i = 0; i < *num_domains; i++) {
struct trustdom_info *dom_info;
- dom_info = TALLOC_P(*domains, struct trustdom_info);
+ dom_info = talloc(*domains, struct trustdom_info);
if (dom_info == NULL) {
DEBUG(1, ("talloc failed\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 8167e3799e..2d33d2d954 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -6368,7 +6368,7 @@ static NTSTATUS ldapsam_enum_trusteddoms(struct pdb_methods *methods,
char *dom_name, *dom_sid_str;
struct trustdom_info *dom_info;
- dom_info = TALLOC_P(*domains, struct trustdom_info);
+ dom_info = talloc(*domains, struct trustdom_info);
if (dom_info == NULL) {
DEBUG(1, ("talloc failed\n"));
return NT_STATUS_NO_MEMORY;
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index a1337eac9d..c9101ca050 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -420,7 +420,7 @@ static int list_trusted_domain(struct db_record *rec, void *private_data)
return 0;
}
- if (!(dom_info = TALLOC_P(state->domains, struct trustdom_info))) {
+ if (!(dom_info = talloc(state->domains, struct trustdom_info))) {
DEBUG(0, ("talloc failed\n"));
return 0;
}
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index 9fd73e8707..f9a2ca3b18 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -305,7 +305,7 @@ static void send_spoolss_notify2_msg(struct tevent_context *ev,
/* Store the message on the pending queue. */
- pnqueue = TALLOC_P(send_ctx, struct notify_queue);
+ pnqueue = talloc(send_ctx, struct notify_queue);
if (!pnqueue) {
DEBUG(0,("send_spoolss_notify2_msg: Out of memory.\n"));
return;
@@ -313,7 +313,7 @@ static void send_spoolss_notify2_msg(struct tevent_context *ev,
/* allocate a new msg structure and copy the fields */
- if ( !(pnqueue->msg = TALLOC_P(send_ctx, SPOOLSS_NOTIFY_MSG)) ) {
+ if ( !(pnqueue->msg = talloc(send_ctx, SPOOLSS_NOTIFY_MSG)) ) {
DEBUG(0,("send_spoolss_notify2_msg: talloc() of size [%lu] failed!\n",
(unsigned long)sizeof(SPOOLSS_NOTIFY_MSG)));
return;
@@ -357,7 +357,7 @@ static void send_notify_field_values(struct tevent_context *ev,
if (!create_send_ctx())
return;
- msg = TALLOC_P(send_ctx, struct spoolss_notify_msg);
+ msg = talloc(send_ctx, struct spoolss_notify_msg);
if (!msg)
return;
@@ -388,7 +388,7 @@ static void send_notify_field_buffer(struct tevent_context *ev,
if (!create_send_ctx())
return;
- msg = TALLOC_P(send_ctx, struct spoolss_notify_msg);
+ msg = talloc(send_ctx, struct spoolss_notify_msg);
if (!msg)
return;
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index ff19de200d..b8bbddfebd 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -524,7 +524,7 @@ bool cups_cache_reload(struct tevent_context *ev,
struct cups_async_cb_args *cb_args;
int *p_pipe_fd;
- cb_args = TALLOC_P(NULL, struct cups_async_cb_args);
+ cb_args = talloc(NULL, struct cups_async_cb_args);
if (cb_args == NULL) {
return false;
}
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 389975587d..a2ae178783 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -466,7 +466,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
uint32_t type,
const uint8_t *data_p, size_t size)
{
- struct regval_blob *regval = TALLOC_P(ctx, struct regval_blob);
+ struct regval_blob *regval = talloc(ctx, struct regval_blob);
if (regval == NULL) {
return NULL;
@@ -505,7 +505,7 @@ int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint32_t type,
/* allocate a slot in the array of pointers */
if ( ctr->num_values == 0 ) {
- ctr->values = TALLOC_P( ctr, struct regval_blob *);
+ ctr->values = talloc( ctr, struct regval_blob *);
} else {
ctr->values = talloc_realloc(ctr, ctr->values,
struct regval_blob *,
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index a120c6e7fe..48cec63094 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -2412,14 +2412,14 @@ NTSTATUS _lsa_GetUserName(struct pipes_struct *p,
domname = p->session_info->info3->base.domain.string;
}
- account_name = TALLOC_P(p->mem_ctx, struct lsa_String);
+ account_name = talloc(p->mem_ctx, struct lsa_String);
if (!account_name) {
return NT_STATUS_NO_MEMORY;
}
init_lsa_String(account_name, username);
if (r->out.authority_name) {
- authority_name = TALLOC_P(p->mem_ctx, struct lsa_String);
+ authority_name = talloc(p->mem_ctx, struct lsa_String);
if (!authority_name) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index c63a81dd77..228cb96cc0 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -1139,7 +1139,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
case 102: {
struct srvsvc_NetSrvInfo102 *info102;
- info102 = TALLOC_P(p->mem_ctx, struct srvsvc_NetSrvInfo102);
+ info102 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo102);
if (!info102) {
return WERR_NOMEM;
}
@@ -1165,7 +1165,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
case 101: {
struct srvsvc_NetSrvInfo101 *info101;
- info101 = TALLOC_P(p->mem_ctx, struct srvsvc_NetSrvInfo101);
+ info101 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo101);
if (!info101) {
return WERR_NOMEM;
}
@@ -1184,7 +1184,7 @@ WERROR _srvsvc_NetSrvGetInfo(struct pipes_struct *p,
case 100: {
struct srvsvc_NetSrvInfo100 *info100;
- info100 = TALLOC_P(p->mem_ctx, struct srvsvc_NetSrvInfo100);
+ info100 = talloc(p->mem_ctx, struct srvsvc_NetSrvInfo100);
if (!info100) {
return WERR_NOMEM;
}
@@ -1454,47 +1454,47 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p,
switch (r->in.level) {
case 0:
- info->info0 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo0);
+ info->info0 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo0);
W_ERROR_HAVE_NO_MEMORY(info->info0);
init_srv_share_info_0(p, info->info0, snum);
break;
case 1:
- info->info1 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo1);
+ info->info1 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo1);
W_ERROR_HAVE_NO_MEMORY(info->info1);
init_srv_share_info_1(p, info->info1, snum);
break;
case 2:
- info->info2 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo2);
+ info->info2 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo2);
W_ERROR_HAVE_NO_MEMORY(info->info2);
init_srv_share_info_2(p, info->info2, snum);
break;
case 501:
- info->info501 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo501);
+ info->info501 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo501);
W_ERROR_HAVE_NO_MEMORY(info->info501);
init_srv_share_info_501(p, info->info501, snum);
break;
case 502:
- info->info502 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo502);
+ info->info502 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo502);
W_ERROR_HAVE_NO_MEMORY(info->info502);
init_srv_share_info_502(p, info->info502, snum);
break;
case 1004:
- info->info1004 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo1004);
+ info->info1004 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo1004);
W_ERROR_HAVE_NO_MEMORY(info->info1004);
init_srv_share_info_1004(p, info->info1004, snum);
break;
case 1005:
- info->info1005 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo1005);
+ info->info1005 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo1005);
W_ERROR_HAVE_NO_MEMORY(info->info1005);
init_srv_share_info_1005(p, info->info1005, snum);
break;
case 1006:
- info->info1006 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo1006);
+ info->info1006 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo1006);
W_ERROR_HAVE_NO_MEMORY(info->info1006);
init_srv_share_info_1006(p, info->info1006, snum);
break;
case 1007:
- info->info1007 = TALLOC_P(p->mem_ctx, struct srvsvc_NetShareInfo1007);
+ info->info1007 = talloc(p->mem_ctx, struct srvsvc_NetShareInfo1007);
W_ERROR_HAVE_NO_MEMORY(info->info1007);
init_srv_share_info_1007(p, info->info1007, snum);
break;
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index da4ed9966c..4e9ab91eae 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -134,7 +134,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn)
if (sconn->using_smb2) {
/* SMB2 */
if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) ||
- !(conn->params = TALLOC_P(conn, struct share_params))) {
+ !(conn->params = talloc(conn, struct share_params))) {
DEBUG(0,("TALLOC_ZERO() failed!\n"));
TALLOC_FREE(conn);
return NULL;
@@ -189,7 +189,7 @@ find_again:
}
if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) ||
- !(conn->params = TALLOC_P(conn, struct share_params))) {
+ !(conn->params = talloc(conn, struct share_params))) {
DEBUG(0,("TALLOC_ZERO() failed!\n"));
TALLOC_FREE(conn);
return NULL;
diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c
index 63c287cd41..03541880e1 100644
--- a/source3/smbd/dfree.c
+++ b/source3/smbd/dfree.c
@@ -207,7 +207,7 @@ uint64_t get_dfree_info(connection_struct *conn,
/* No cached info or time to refresh. */
if (!dfc) {
- dfc = TALLOC_P(conn, struct dfree_cached_info);
+ dfc = talloc(conn, struct dfree_cached_info);
if (!dfc) {
return dfree_ret;
}
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index b452000e13..669e28e715 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -645,7 +645,7 @@ void reply_trans(struct smb_request *req)
return;
}
- if ((state = TALLOC_P(conn, struct trans_state)) == NULL) {
+ if ((state = talloc(conn, struct trans_state)) == NULL) {
DEBUG(0, ("talloc failed\n"));
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBtrans);
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 1d296e342d..2ae01a95ab 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -692,7 +692,7 @@ static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
bool *ppath_contains_wcard)
{
NTSTATUS status;
- struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
+ struct dfs_path *pdp = talloc(ctx, struct dfs_path);
if (!pdp) {
return NT_STATUS_NO_MEMORY;
@@ -825,7 +825,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
int snum;
NTSTATUS status = NT_STATUS_NOT_FOUND;
bool dummy;
- struct dfs_path *pdp = TALLOC_P(ctx, struct dfs_path);
+ struct dfs_path *pdp = talloc(ctx, struct dfs_path);
char *oldpath;
if (!pdp) {
@@ -1318,7 +1318,7 @@ bool create_junction(TALLOC_CTX *ctx,
{
int snum;
bool dummy;
- struct dfs_path *pdp = TALLOC_P(ctx,struct dfs_path);
+ struct dfs_path *pdp = talloc(ctx,struct dfs_path);
NTSTATUS status;
if (!pdp) {
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index d711cd69be..a70f86df00 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -520,7 +520,7 @@ struct sys_notify_context *sys_notify_context_create(connection_struct *conn,
{
struct sys_notify_context *ctx;
- if (!(ctx = TALLOC_P(mem_ctx, struct sys_notify_context))) {
+ if (!(ctx = talloc(mem_ctx, struct sys_notify_context))) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 18d5979e3c..f0873a6b9c 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -3020,7 +3020,7 @@ void reply_nttrans(struct smb_request *req)
return;
}
- if ((state = TALLOC_P(conn, struct trans_state)) == NULL) {
+ if ((state = talloc(conn, struct trans_state)) == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBnttrans);
return;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 9252ee639f..aebe64e2d8 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4750,7 +4750,7 @@ struct security_descriptor *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fna
return NULL;
}
- if (!(conn->params = TALLOC_P(conn, struct share_params))) {
+ if (!(conn->params = talloc(conn, struct share_params))) {
DEBUG(0,("get_nt_acl_no_snum: talloc() failed!\n"));
TALLOC_FREE(conn);
return NULL;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2b8521d54a..78beb730b9 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -891,7 +891,7 @@ struct idle_event *event_add_idle(struct event_context *event_ctx,
struct idle_event *result;
struct timeval now = timeval_current();
- result = TALLOC_P(mem_ctx, struct idle_event);
+ result = talloc(mem_ctx, struct idle_event);
if (result == NULL) {
DEBUG(0, ("talloc failed\n"));
return NULL;
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index f90f569e8a..6e686ef273 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -308,7 +308,7 @@ static NTSTATUS schedule_smb2_sendfile_read(struct smbd_smb2_request *smb2req,
/* Make a copy of state attached to the smb2req. Attach
the destructor here as this will trigger the sendfile
call when the request is destroyed. */
- state_copy = TALLOC_P(smb2req, struct smbd_smb2_read_state);
+ state_copy = talloc(smb2req, struct smbd_smb2_read_state);
if (!state_copy) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index b9a4d4624b..6d85edf9eb 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -316,7 +316,7 @@ static struct ea_list *get_ea_list_from_file(TALLOC_CTX *mem_ctx, connection_str
|| samba_private_attr_name(names[i]))
continue;
- listp = TALLOC_P(mem_ctx, struct ea_list);
+ listp = talloc(mem_ctx, struct ea_list);
if (listp == NULL) {
return NULL;
}
@@ -8672,7 +8672,7 @@ void reply_trans2(struct smb_request *req)
}
}
- if ((state = TALLOC_P(conn, struct trans_state)) == NULL) {
+ if ((state = talloc(conn, struct trans_state)) == NULL) {
DEBUG(0, ("talloc failed\n"));
reply_nterror(req, NT_STATUS_NO_MEMORY);
END_PROFILE(SMBtrans2);
diff --git a/source3/torture/nbench.c b/source3/torture/nbench.c
index efae14c76c..d2fddf0094 100644
--- a/source3/torture/nbench.c
+++ b/source3/torture/nbench.c
@@ -96,7 +96,7 @@ static struct nbench_cmd_struct *nbench_parse(TALLOC_CTX *mem_ctx,
char *cmd;
char *status;
- result = TALLOC_P(mem_ctx, struct nbench_cmd_struct);
+ result = talloc(mem_ctx, struct nbench_cmd_struct);
if (result == NULL) {
return NULL;
}
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 74ef572577..572fec1f42 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -470,7 +470,7 @@ int main(int argc, char *argv[])
/* some basic initialization stuff */
sec_init();
vfs.conn = TALLOC_ZERO_P(NULL, connection_struct);
- vfs.conn->params = TALLOC_P(vfs.conn, struct share_params);
+ vfs.conn->params = talloc(vfs.conn, struct share_params);
for (i=0; i < 1024; i++)
vfs.files[i] = NULL;
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 4339dc836c..42dfc48d4a 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -154,7 +154,7 @@ static bool net_sh_process(struct net_context *c,
return true;
}
- new_ctx = TALLOC_P(ctx, struct rpc_sh_ctx);
+ new_ctx = talloc(ctx, struct rpc_sh_ctx);
if (new_ctx == NULL) {
d_fprintf(stderr, _("talloc failed\n"));
return false;
@@ -234,7 +234,7 @@ int net_rpc_shell(struct net_context *c, int argc, const char **argv)
libnetapi_set_use_kerberos(c->netapi_ctx);
}
- ctx = TALLOC_P(NULL, struct rpc_sh_ctx);
+ ctx = talloc(NULL, struct rpc_sh_ctx);
if (ctx == NULL) {
d_fprintf(stderr, _("talloc failed\n"));
return -1;
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index 06ed4533d5..295f9ce4d9 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -278,7 +278,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
}
/* (Finally) - add to list. */
- fl = TALLOC_P(ctx, struct file_list);
+ fl = talloc(ctx, struct file_list);
if (!fl) {
sys_closedir(dp);
return -1;
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index d2a79640e9..c115e2d29d 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -78,7 +78,7 @@ static struct con_struct *create_cs(struct net_context *c,
return cs;
}
- cs = TALLOC_P(ctx, struct con_struct);
+ cs = talloc(ctx, struct con_struct);
if (!cs) {
*perr = NT_STATUS_NO_MEMORY;
return NULL;
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index a1f5ac69b5..05261b70b0 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -4527,7 +4527,7 @@ struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const cha
DEBUG(10,("wcache_tdc_fetch_domain: Found domain %s\n",
name));
- d = TALLOC_P( ctx, struct winbindd_tdc_domain );
+ d = talloc( ctx, struct winbindd_tdc_domain );
if ( !d )
break;
@@ -4577,7 +4577,7 @@ struct winbindd_tdc_domain*
dom_list[i].domain_name,
sid_string_dbg(sid)));
- d = TALLOC_P(ctx, struct winbindd_tdc_domain);
+ d = talloc(ctx, struct winbindd_tdc_domain);
if (!d)
break;
diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c
index ab8934bfd4..7480db6a12 100644
--- a/source3/winbindd/winbindd_cred_cache.c
+++ b/source3/winbindd/winbindd_cred_cache.c
@@ -596,7 +596,7 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
return NT_STATUS_OK;
}
- entry = TALLOC_P(NULL, struct WINBINDD_CCACHE_ENTRY);
+ entry = talloc(NULL, struct WINBINDD_CCACHE_ENTRY);
if (!entry) {
return NT_STATUS_NO_MEMORY;
}