diff options
Diffstat (limited to 'source3')
107 files changed, 218 insertions, 219 deletions
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c index afe71ee2a6..cfe89495a0 100644 --- a/source3/auth/auth_builtin.c +++ b/source3/auth/auth_builtin.c @@ -57,7 +57,7 @@ static NTSTATUS auth_init_guest(struct auth_context *auth_context, const char *o { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -117,7 +117,7 @@ static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, co { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -171,7 +171,7 @@ static NTSTATUS auth_init_fixed_challenge(struct auth_context *auth_context, con { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 8a716038a8..2afff6fc7b 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -419,7 +419,7 @@ static NTSTATUS auth_init_ntdomain(struct auth_context *auth_context, const char { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -525,7 +525,7 @@ static NTSTATUS auth_init_trustdomain(struct auth_context *auth_context, const c { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c index 8e332c8e5a..e9a74b6d12 100644 --- a/source3/auth/auth_netlogond.c +++ b/source3/auth/auth_netlogond.c @@ -429,7 +429,7 @@ static NTSTATUS auth_init_netlogond(struct auth_context *auth_context, { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index d09d60e6cf..7faa8de027 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -44,7 +44,7 @@ static NTSTATUS auth_init_sam_ignoredomain(struct auth_context *auth_context, co { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -108,7 +108,7 @@ static NTSTATUS auth_init_sam(struct auth_context *auth_context, const char *par { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index 1b27e7bcc9..03b7884068 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -99,7 +99,7 @@ static NTSTATUS auth_init_samba4(struct auth_context *auth_context, { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_script.c b/source3/auth/auth_script.c index 5691ea14f1..4432ff4aec 100644 --- a/source3/auth/auth_script.c +++ b/source3/auth/auth_script.c @@ -124,7 +124,7 @@ static NTSTATUS auth_init_script(struct auth_context *auth_context, const char * { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index d6538b6e10..33c658dd8f 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -452,7 +452,7 @@ static NTSTATUS auth_init_smbserver(struct auth_context *auth_context, const cha { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index 086c39e026..36956986c5 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -73,7 +73,7 @@ static NTSTATUS auth_init_unix(struct auth_context *auth_context, const char* pa { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_wbc.c b/source3/auth/auth_wbc.c index 6150040229..1b70042d90 100644 --- a/source3/auth/auth_wbc.c +++ b/source3/auth/auth_wbc.c @@ -182,7 +182,7 @@ static NTSTATUS auth_init_wbc(struct auth_context *auth_context, const char *par { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c index 2143353541..d4ace2c919 100644 --- a/source3/auth/auth_winbind.c +++ b/source3/auth/auth_winbind.c @@ -142,7 +142,7 @@ static NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char { struct auth_methods *result; - result = TALLOC_ZERO_P(auth_context, struct auth_methods); + result = talloc_zero(auth_context, struct auth_methods); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c index c4bcda4b1b..2d3cb65785 100644 --- a/source3/auth/check_samsec.c +++ b/source3/auth/check_samsec.c @@ -531,7 +531,7 @@ NTSTATUS check_sam_security_info3(const DATA_BLOB *challenge, goto done; } - info3 = TALLOC_ZERO_P(mem_ctx, struct netr_SamInfo3); + info3 = talloc_zero(mem_ctx, struct netr_SamInfo3); if (info3 == NULL) { status = NT_STATUS_NO_MEMORY; goto done; diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index 440e45c8e5..a53e556d28 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -45,7 +45,7 @@ struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx) { struct auth_serversupplied_info *result; - result = TALLOC_ZERO_P(mem_ctx, struct auth_serversupplied_info); + result = talloc_zero(mem_ctx, struct auth_serversupplied_info); if (result == NULL) { DEBUG(0, ("talloc failed\n")); return NULL; diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 386e667834..22df21f5ed 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -338,7 +338,7 @@ struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx, DEBUG(10, ("Create local NT token for %s\n", sid_string_dbg(user_sid))); - if (!(result = TALLOC_ZERO_P(mem_ctx, struct security_token))) { + if (!(result = talloc_zero(mem_ctx, struct security_token))) { DEBUG(0, ("talloc failed\n")); return NULL; } diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index a51e9ec407..73472dd61f 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -221,7 +221,6 @@ copy an IP address from one buffer to another #define TALLOC(ctx, size) talloc_named_const(ctx, size, __location__) #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) #define TALLOC_ZERO_ARRAY(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type) #define TALLOC_SIZE(ctx, size) talloc_named_const(ctx, size, __location__) #define TALLOC_ZERO_SIZE(ctx, size) _talloc_zero(ctx, size, __location__) diff --git a/source3/lib/ctdb_packet.c b/source3/lib/ctdb_packet.c index 35c76fa44f..9faf519a60 100644 --- a/source3/lib/ctdb_packet.c +++ b/source3/lib/ctdb_packet.c @@ -44,7 +44,7 @@ struct ctdb_packet_context *ctdb_packet_init(TALLOC_CTX *mem_ctx, int fd) { struct ctdb_packet_context *result; - if (!(result = TALLOC_ZERO_P(mem_ctx, struct ctdb_packet_context))) { + if (!(result = talloc_zero(mem_ctx, struct ctdb_packet_context))) { return NULL; } diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index ecc331aa6a..79dc1f246a 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -494,7 +494,7 @@ static NTSTATUS ctdbd_init_connection(TALLOC_CTX *mem_ctx, struct ctdbd_connection *conn; NTSTATUS status; - if (!(conn = TALLOC_ZERO_P(mem_ctx, struct ctdbd_connection))) { + if (!(conn = talloc_zero(mem_ctx, struct ctdbd_connection))) { DEBUG(0, ("talloc failed\n")); return NT_STATUS_NO_MEMORY; } diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index d5daba13e5..935bb03f34 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -1025,7 +1025,7 @@ static struct db_record *fetch_locked_internal(struct db_ctdb_ctx *ctx, return NULL; } - if (!(crec = TALLOC_ZERO_P(result, struct db_ctdb_rec))) { + if (!(crec = talloc_zero(result, struct db_ctdb_rec))) { DEBUG(0, ("talloc failed\n")); TALLOC_FREE(result); return NULL; @@ -1365,7 +1365,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, return NULL; } - if (!(result = TALLOC_ZERO_P(mem_ctx, struct db_context))) { + if (!(result = talloc_zero(mem_ctx, struct db_context))) { 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 c27df0cdb9..6ecd72810d 100644 --- a/source3/lib/dbwrap_file.c +++ b/source3/lib/dbwrap_file.c @@ -348,7 +348,7 @@ struct db_context *db_open_file(TALLOC_CTX *mem_ctx, struct db_context *result = NULL; struct db_file_ctx *ctx; - if (!(result = TALLOC_ZERO_P(mem_ctx, struct db_context))) { + if (!(result = talloc_zero(mem_ctx, struct db_context))) { DEBUG(0, ("talloc failed\n")); return NULL; } diff --git a/source3/lib/dbwrap_rbt.c b/source3/lib/dbwrap_rbt.c index af88c79e6a..fd6e988864 100644 --- a/source3/lib/dbwrap_rbt.c +++ b/source3/lib/dbwrap_rbt.c @@ -400,7 +400,7 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx) return NULL; } - result->private_data = TALLOC_ZERO_P(result, struct db_rbt_ctx); + result->private_data = talloc_zero(result, struct db_rbt_ctx); if (result->private_data == NULL) { TALLOC_FREE(result); diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index 0342725772..f8baa0aeca 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -341,7 +341,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx, struct db_context *result = NULL; struct db_tdb_ctx *db_tdb; - result = TALLOC_ZERO_P(mem_ctx, struct db_context); + result = talloc_zero(mem_ctx, struct db_context); if (result == NULL) { DEBUG(0, ("talloc failed\n")); goto fail; diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c index 0ff0cb1fa8..556938fe1d 100644 --- a/source3/lib/eventlog/eventlog.c +++ b/source3/lib/eventlog/eventlog.c @@ -416,7 +416,7 @@ ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only ) return ptr; } - if ( !(tdb_node = TALLOC_ZERO_P( NULL, ELOG_TDB)) ) { + if ( !(tdb_node = talloc_zero( NULL, ELOG_TDB)) ) { DEBUG(0,("elog_open_tdb: talloc() failure!\n")); tdb_close( tdb ); return NULL; diff --git a/source3/lib/events.c b/source3/lib/events.c index fc7f1d493a..f077f58581 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -42,7 +42,7 @@ static struct tevent_poll_private *tevent_get_poll_private( state = (struct tevent_poll_private *)ev->additional_data; if (state == NULL) { - state = TALLOC_ZERO_P(ev, struct tevent_poll_private); + state = talloc_zero(ev, struct tevent_poll_private); ev->additional_data = (void *)state; if (state == NULL) { DEBUG(10, ("talloc failed\n")); diff --git a/source3/lib/memcache.c b/source3/lib/memcache.c index 425861ed77..88453f32dd 100644 --- a/source3/lib/memcache.c +++ b/source3/lib/memcache.c @@ -72,7 +72,7 @@ struct memcache *memcache_init(TALLOC_CTX *mem_ctx, size_t max_size) { struct memcache *result; - result = TALLOC_ZERO_P(mem_ctx, struct memcache); + result = talloc_zero(mem_ctx, struct memcache); if (result == NULL) { return NULL; } diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 932d47838d..76c1090b81 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -184,7 +184,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, struct messaging_context *ctx; NTSTATUS status; - if (!(ctx = TALLOC_ZERO_P(mem_ctx, struct messaging_context))) { + if (!(ctx = talloc_zero(mem_ctx, struct messaging_context))) { return NULL; } diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c index bfed35ffe4..09b8706262 100644 --- a/source3/lib/messages_local.c +++ b/source3/lib/messages_local.c @@ -92,7 +92,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx, return NT_STATUS_NO_MEMORY; } - ctx = TALLOC_ZERO_P(result, struct messaging_tdb_context); + ctx = talloc_zero(result, struct messaging_tdb_context); if (!ctx) { DEBUG(0, ("talloc failed\n")); TALLOC_FREE(result); @@ -187,7 +187,7 @@ static NTSTATUS messaging_tdb_fetch(TDB_CONTEXT *msg_tdb, DATA_BLOB blob; enum ndr_err_code ndr_err; - if (!(result = TALLOC_ZERO_P(mem_ctx, struct messaging_array))) { + if (!(result = talloc_zero(mem_ctx, struct messaging_array))) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 4c9bfcb419..3adb97e357 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -122,7 +122,7 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, return WERR_CAN_NOT_COMPLETE; } - p = TALLOC_ZERO_P(ctx, struct client_ipc_connection); + p = talloc_zero(ctx, struct client_ipc_connection); if (p == NULL) { return WERR_NOMEM; } diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index 49ba74ec17..54ec14eb84 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -610,7 +610,7 @@ static WERROR map_buffer_to_alias_info(TALLOC_CTX *mem_ctx, struct LOCALGROUP_INFO_1002 *info1002; union samr_AliasInfo *info = NULL; - info = TALLOC_ZERO_P(mem_ctx, union samr_AliasInfo); + info = talloc_zero(mem_ctx, union samr_AliasInfo); W_ERROR_HAVE_NO_MEMORY(info); switch (level) { diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 1d34934565..14259864ae 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -37,7 +37,7 @@ static NET_API_STATUS libnetapi_init_private_context(struct libnetapi_ctx *ctx) return W_ERROR_V(WERR_INVALID_PARAM); } - priv = TALLOC_ZERO_P(ctx, struct libnetapi_private_ctx); + priv = talloc_zero(ctx, struct libnetapi_private_ctx); if (!priv) { return W_ERROR_V(WERR_NOMEM); } diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index 599ebb7b46..92dbcbae1c 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -259,7 +259,7 @@ static sbcErr smbconf_reg_set_multi_sz_value(struct registry_key *key, goto done; } - value = TALLOC_ZERO_P(tmp_ctx, struct registry_value); + value = talloc_zero(tmp_ctx, struct registry_value); if (value == NULL) { err = SBC_ERR_NOMEM; goto done; @@ -604,7 +604,7 @@ static sbcErr smbconf_reg_init(struct smbconf_ctx *ctx, const char *path) goto done; } - ctx->data = TALLOC_ZERO_P(ctx, struct reg_private_data); + ctx->data = talloc_zero(ctx, struct reg_private_data); werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token)); if (!W_ERROR_IS_OK(werr)) { @@ -913,7 +913,7 @@ static sbcErr smbconf_reg_get_share(struct smbconf_ctx *ctx, goto done; } - tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service); + tmp_service = talloc_zero(tmp_ctx, struct smbconf_service); if (tmp_service == NULL) { err = SBC_ERR_NOMEM; goto done; diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index c49788459b..38c7b207f5 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -1862,7 +1862,7 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, const char *location, struct smbldap_state **smbldap_state) { - *smbldap_state = TALLOC_ZERO_P(mem_ctx, struct smbldap_state); + *smbldap_state = talloc_zero(mem_ctx, struct smbldap_state); if (!*smbldap_state) { DEBUG(0, ("talloc() failed for ldapsam private_data!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/lib/util_cmdline.c b/source3/lib/util_cmdline.c index cb0b79a5d3..6c2802c208 100644 --- a/source3/lib/util_cmdline.c +++ b/source3/lib/util_cmdline.c @@ -34,7 +34,7 @@ struct user_auth_info *user_auth_info_init(TALLOC_CTX *mem_ctx) { struct user_auth_info *result; - result = TALLOC_ZERO_P(mem_ctx, struct user_auth_info); + result = talloc_zero(mem_ctx, struct user_auth_info); if (result == NULL) { return NULL; } diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c index 2fd0f088ab..ffa858d779 100644 --- a/source3/lib/util_nttoken.c +++ b/source3/lib/util_nttoken.c @@ -39,7 +39,7 @@ struct security_token *dup_nt_token(TALLOC_CTX *mem_ctx, const struct security_t if (!ptoken) return NULL; - token = TALLOC_ZERO_P(mem_ctx, struct security_token); + token = talloc_zero(mem_ctx, struct security_token); if (token == NULL) { DEBUG(0, ("talloc failed\n")); return NULL; @@ -80,7 +80,7 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } - token = TALLOC_ZERO_P(mem_ctx, struct security_token); + token = talloc_zero(mem_ctx, struct security_token); NT_STATUS_HAVE_NO_MEMORY(token); for (i=0; i < token_1->num_sids; i++) { diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 743bf42b1e..5d75383ccc 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -784,7 +784,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; @@ -1431,7 +1431,7 @@ static ADS_STATUS ads_modlist_add(TALLOC_CTX *ctx, ADS_MODLIST *mods, *mods = (ADS_MODLIST)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) { diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c index eb49b19b20..b0ec7b88d9 100644 --- a/source3/libgpo/gpext/registry.c +++ b/source3/libgpo/gpext/registry.c @@ -111,14 +111,14 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx, ZERO_STRUCTP(*reg_entry); - data = TALLOC_ZERO_P(mem_ctx, struct registry_value); + data = talloc_zero(mem_ctx, struct registry_value); if (!data) return false; data->type = r->type; data->data = data_blob_talloc(data, r->data, r->size); - entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry); + entry = talloc_zero(mem_ctx, struct gp_registry_entry); if (!entry) return false; @@ -327,7 +327,7 @@ static NTSTATUS registry_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL } }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c index 3e977378ee..0b6748507a 100644 --- a/source3/libgpo/gpext/scripts.c +++ b/source3/libgpo/gpext/scripts.c @@ -62,7 +62,7 @@ static NTSTATUS scripts_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL }, }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, @@ -89,10 +89,10 @@ static NTSTATUS generate_gp_registry_entry(TALLOC_CTX *mem_ctx, struct gp_registry_entry *entry = NULL; struct registry_value *data = NULL; - entry = TALLOC_ZERO_P(mem_ctx, struct gp_registry_entry); + entry = talloc_zero(mem_ctx, struct gp_registry_entry); NT_STATUS_HAVE_NO_MEMORY(entry); - data = TALLOC_ZERO_P(mem_ctx, struct registry_value); + data = talloc_zero(mem_ctx, struct registry_value); NT_STATUS_HAVE_NO_MEMORY(data); data->type = data_type; diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c index dea0de33f9..b68840d2f6 100644 --- a/source3/libgpo/gpext/security.c +++ b/source3/libgpo/gpext/security.c @@ -202,7 +202,7 @@ static NTSTATUS security_get_reg_config(TALLOC_CTX *mem_ctx, { NULL, REG_NONE, NULL } }; - info = TALLOC_ZERO_P(mem_ctx, struct gp_extension_reg_info); + info = talloc_zero(mem_ctx, struct gp_extension_reg_info); NT_STATUS_HAVE_NO_MEMORY(info); status = gp_ext_info_add_entry(mem_ctx, GP_EXT_NAME, diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c index 29b31aec8e..5142e919cc 100644 --- a/source3/libgpo/gpo_reg.c +++ b/source3/libgpo/gpo_reg.c @@ -36,7 +36,7 @@ struct security_token *registry_create_system_token(TALLOC_CTX *mem_ctx) { struct security_token *token = NULL; - token = TALLOC_ZERO_P(mem_ctx, struct security_token); + token = talloc_zero(mem_ctx, struct security_token); if (!token) { DEBUG(1,("talloc failed\n")); return NULL; @@ -74,7 +74,7 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx, return werr; } - tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context); + tmp_ctx = talloc_zero(mem_ctx, struct gp_registry_context); W_ERROR_HAVE_NO_MEMORY(tmp_ctx); if (token) { @@ -395,7 +395,7 @@ static WERROR gp_reg_read_groupmembership(TALLOC_CTX *mem_ctx, int num_token_sids = 0; struct security_token *tmp_token = NULL; - tmp_token = TALLOC_ZERO_P(mem_ctx, struct security_token); + tmp_token = talloc_zero(mem_ctx, struct security_token); W_ERROR_HAVE_NO_MEMORY(tmp_token); path = gp_reg_groupmembership_path(mem_ctx, object_sid, flags); @@ -602,7 +602,7 @@ static WERROR gp_read_reg_gpo(TALLOC_CTX *mem_ctx, return WERR_INVALID_PARAM; } - gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT); + gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT); W_ERROR_HAVE_NO_MEMORY(gpo); werr = gp_read_reg_gpovals(mem_ctx, key, gpo); diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 47ceff1509..c768226e8b 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -54,7 +54,7 @@ NTSTATUS libnet_dssync_init_context(TALLOC_CTX *mem_ctx, { struct dssync_context *ctx; - ctx = TALLOC_ZERO_P(mem_ctx, struct dssync_context); + ctx = talloc_zero(mem_ctx, struct dssync_context); NT_STATUS_HAVE_NO_MEMORY(ctx); talloc_set_destructor(ctx, libnet_dssync_free_context); @@ -339,7 +339,7 @@ static NTSTATUS libnet_dssync_build_request(TALLOC_CTX *mem_ctx, level = 5; } - nc = TALLOC_ZERO_P(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier); + nc = talloc_zero(mem_ctx, struct drsuapi_DsReplicaObjectIdentifier); if (!nc) { status = NT_STATUS_NO_MEMORY; goto fail; @@ -351,7 +351,7 @@ static NTSTATUS libnet_dssync_build_request(TALLOC_CTX *mem_ctx, if (!ctx->single_object_replication && !ctx->force_full_replication && utdv) { - cursors = TALLOC_ZERO_P(mem_ctx, + cursors = talloc_zero(mem_ctx, struct drsuapi_DsReplicaCursorCtrEx); if (!cursors) { status = NT_STATUS_NO_MEMORY; @@ -442,7 +442,7 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, struct dcerpc_binding_handle *b = ctx->cli->binding_handle; if (!ctx->single_object_replication) { - new_utdv = TALLOC_ZERO_P(mem_ctx, struct replUpToDateVectorBlob); + new_utdv = talloc_zero(mem_ctx, struct replUpToDateVectorBlob); if (!new_utdv) { status = NT_STATUS_NO_MEMORY; goto out; diff --git a/source3/libnet/libnet_dssync_keytab.c b/source3/libnet/libnet_dssync_keytab.c index 6f3ed64226..06758b4510 100644 --- a/source3/libnet/libnet_dssync_keytab.c +++ b/source3/libnet/libnet_dssync_keytab.c @@ -200,7 +200,7 @@ static NTSTATUS parse_supplemental_credentials(TALLOC_CTX *mem_ctx, goto done; } - pkb = TALLOC_ZERO_P(mem_ctx, struct package_PrimaryKerberosBlob); + pkb = talloc_zero(mem_ctx, struct package_PrimaryKerberosBlob); if (!pkb) { status = NT_STATUS_NO_MEMORY; goto done; diff --git a/source3/libnet/libnet_keytab.c b/source3/libnet/libnet_keytab.c index f395c975e5..6349c2291f 100644 --- a/source3/libnet/libnet_keytab.c +++ b/source3/libnet/libnet_keytab.c @@ -66,7 +66,7 @@ krb5_error_code libnet_keytab_init(TALLOC_CTX *mem_ctx, struct libnet_keytab_context *r; - r = TALLOC_ZERO_P(mem_ctx, struct libnet_keytab_context); + r = talloc_zero(mem_ctx, struct libnet_keytab_context); if (!r) { return ENOMEM; } diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index ee54088ced..9803c89538 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -70,7 +70,7 @@ NTSTATUS libnet_samsync_init_context(TALLOC_CTX *mem_ctx, *ctx_p = NULL; - ctx = TALLOC_ZERO_P(mem_ctx, struct samsync_context); + ctx = talloc_zero(mem_ctx, struct samsync_context); NT_STATUS_HAVE_NO_MEMORY(ctx); if (domain_sid) { @@ -404,7 +404,7 @@ NTSTATUS pull_netr_AcctLockStr(TALLOC_CTX *mem_ctx, *str_p = NULL; - str = TALLOC_ZERO_P(mem_ctx, struct netr_AcctLockStr); + str = talloc_zero(mem_ctx, struct netr_AcctLockStr); if (!str) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/libnet/libnet_samsync_ldif.c b/source3/libnet/libnet_samsync_ldif.c index bcdcd48ecf..a8eb3c9d11 100644 --- a/source3/libnet/libnet_samsync_ldif.c +++ b/source3/libnet/libnet_samsync_ldif.c @@ -946,7 +946,7 @@ static NTSTATUS ldif_init_context(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } - r = TALLOC_ZERO_P(mem_ctx, struct samsync_ldif_context); + r = talloc_zero(mem_ctx, struct samsync_ldif_context); NT_STATUS_HAVE_NO_MEMORY(r); /* Get the ldap suffix */ diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c index aed03ef382..c0eb724fbf 100644 --- a/source3/libsmb/clidgram.c +++ b/source3/libsmb/clidgram.c @@ -227,7 +227,7 @@ static bool parse_getdc_response( blob = p.smb.body.trans.data; - r = TALLOC_ZERO_P(mem_ctx, struct netlogon_samlogon_response); + r = talloc_zero(mem_ctx, struct netlogon_samlogon_response); if (!r) { return false; } diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 6bfc3cd086..1122bbbaa5 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -213,7 +213,7 @@ struct cli_state *cli_initialise_ex(int signing_state) return NULL; } - cli = TALLOC_ZERO_P(NULL, struct cli_state); + cli = talloc_zero(NULL, struct cli_state); if (!cli) { return NULL; } diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c index 74430fe0ca..9136506e48 100644 --- a/source3/libsmb/cliquota.c +++ b/source3/libsmb/cliquota.c @@ -269,13 +269,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, goto cleanup; } - if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { + if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); return NT_STATUS_NO_MEMORY; } - if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { + if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); return NT_STATUS_NO_MEMORY; @@ -326,13 +326,13 @@ NTSTATUS cli_list_user_quota(struct cli_state *cli, int quota_fnum, goto cleanup; } - if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { + if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); goto cleanup; } - if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { + if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); talloc_destroy(mem_ctx); goto cleanup; diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index edcec0bc32..c6add7ecdd 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -339,7 +339,7 @@ static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx, return NT_STATUS_NOT_FOUND; } - info = TALLOC_ZERO_P(mem_ctx, struct netr_DsRGetDCNameInfo); + info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo); if (!info) { return NT_STATUS_NO_MEMORY; } @@ -659,7 +659,7 @@ static NTSTATUS make_domain_controller_info(TALLOC_CTX *mem_ctx, { struct netr_DsRGetDCNameInfo *info; - info = TALLOC_ZERO_P(mem_ctx, struct netr_DsRGetDCNameInfo); + info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo); NT_STATUS_HAVE_NO_MEMORY(info); if (dc_unc) { @@ -963,7 +963,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx, { struct NETLOGON_SAM_LOGON_RESPONSE_NT40 logon1; - r = TALLOC_ZERO_P(mem_ctx, struct netlogon_samlogon_response); + r = talloc_zero(mem_ctx, struct netlogon_samlogon_response); NT_STATUS_HAVE_NO_MEMORY(r); ZERO_STRUCT(logon1); diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c index a07ea5280a..67c0e08114 100644 --- a/source3/libsmb/samlogon_cache.c +++ b/source3/libsmb/samlogon_cache.c @@ -217,7 +217,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do return NULL; } - info3 = TALLOC_ZERO_P(mem_ctx, struct netr_SamInfo3); + info3 = talloc_zero(mem_ctx, struct netr_SamInfo3); if (!info3) { goto done; } diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c index 1b1d8cb129..cf9ed7dbc6 100644 --- a/source3/libsmb/unexpected.c +++ b/source3/libsmb/unexpected.c @@ -73,7 +73,7 @@ NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx, struct tevent_fd *fde; NTSTATUS status; - result = TALLOC_ZERO_P(mem_ctx, struct nb_packet_server); + result = talloc_zero(mem_ctx, struct nb_packet_server); if (result == NULL) { status = NT_STATUS_NO_MEMORY; goto fail; @@ -140,7 +140,7 @@ static void nb_packet_server_listener(struct tevent_context *ev, } DEBUG(6,("accepted socket %d\n", sock)); - client = TALLOC_ZERO_P(server, struct nb_packet_client); + client = talloc_zero(server, struct nb_packet_client); if (client == NULL) { DEBUG(10, ("talloc failed\n")); close(sock); @@ -378,7 +378,7 @@ static void nb_packet_client_send(struct nb_packet_client *client, return; } - state = TALLOC_ZERO_P(client, struct nb_packet_client_state); + state = talloc_zero(client, struct nb_packet_client_state); if (state == NULL) { DEBUG(10, ("talloc failed\n")); return; @@ -485,7 +485,7 @@ struct tevent_req *nb_packet_reader_send(TALLOC_CTX *mem_ctx, state->query.mailslot_namelen = strlen(mailslot_name); } - state->reader = TALLOC_ZERO_P(state, struct nb_packet_reader); + state->reader = talloc_zero(state, struct nb_packet_reader); if (tevent_req_nomem(state->reader, req)) { return tevent_req_post(req, ev); } diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 9a9fd15789..f82d873364 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -2020,7 +2020,7 @@ static void brl_revalidate(struct messaging_context *msg_ctx, uint32 i; struct server_id last_pid; - if (!(state = TALLOC_ZERO_P(NULL, struct brl_revalidate_state))) { + if (!(state = talloc_zero(NULL, struct brl_revalidate_state))) { DEBUG(0, ("talloc failed\n")); return; } diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 153f3da585..91dff565d3 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -579,7 +579,7 @@ static int parse_delete_tokens_list(struct share_mode_lock *lck, p += sizeof(token_len); - pdtl = TALLOC_ZERO_P(lck, struct delete_token_list); + pdtl = talloc_zero(lck, struct delete_token_list); if (pdtl == NULL) { DEBUG(0,("parse_delete_tokens_list: talloc failed")); return -1; @@ -588,7 +588,7 @@ static int parse_delete_tokens_list(struct share_mode_lock *lck, memcpy(&pdtl->name_hash, p, sizeof(pdtl->name_hash)); p += sizeof(pdtl->name_hash); - pdtl->delete_token = TALLOC_ZERO_P(pdtl, struct security_unix_token); + pdtl->delete_token = talloc_zero(pdtl, struct security_unix_token); if (pdtl->delete_token == NULL) { DEBUG(0,("parse_delete_tokens_list: talloc failed")); return -1; @@ -1513,7 +1513,7 @@ static bool add_delete_on_close_token(struct share_mode_lock *lck, { struct delete_token_list *dtl; - dtl = TALLOC_ZERO_P(lck, struct delete_token_list); + dtl = talloc_zero(lck, struct delete_token_list); if (dtl == NULL) { return false; } diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index fdf32f6c20..961efd85de 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -277,7 +277,7 @@ static struct aio_child_list *init_aio_children(struct vfs_handle_struct *handle } if (data == NULL) { - data = TALLOC_ZERO_P(NULL, struct aio_child_list); + data = talloc_zero(NULL, struct aio_child_list); if (data == NULL) { return NULL; } @@ -481,7 +481,7 @@ static NTSTATUS create_aio_child(struct smbd_server_connection *sconn, fdpair[0] = fdpair[1] = -1; - result = TALLOC_ZERO_P(children, struct aio_child); + result = talloc_zero(children, struct aio_child); NT_STATUS_HAVE_NO_MEMORY(result); if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) == -1) { diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index bf7dacdc1f..e8129f4143 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -611,7 +611,7 @@ static int smb_full_audit_connect(vfs_handle_struct *handle, return result; } - pd = TALLOC_ZERO_P(handle, struct vfs_full_audit_private_data); + pd = talloc_zero(handle, struct vfs_full_audit_private_data); if (!pd) { SMB_VFS_NEXT_DISCONNECT(handle); return -1; diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c index 462932ddb2..ddce7e7dc5 100644 --- a/source3/modules/vfs_smb_traffic_analyzer.c +++ b/source3/modules/vfs_smb_traffic_analyzer.c @@ -666,7 +666,7 @@ static int smb_traffic_analyzer_connect(struct vfs_handle_struct *handle, rf_sock->ref_count++; } else { /* New connection. */ - rf_sock = TALLOC_ZERO_P(NULL, struct refcounted_sock); + rf_sock = talloc_zero(NULL, struct refcounted_sock); if (rf_sock == NULL) { SMB_VFS_NEXT_DISCONNECT(handle); errno = ENOMEM; diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c index d53d291832..e9fd83bfea 100644 --- a/source3/modules/vfs_tsmsm.c +++ b/source3/modules/vfs_tsmsm.c @@ -97,7 +97,7 @@ static int tsmsm_connect(struct vfs_handle_struct *handle, return ret; } - tsmd = TALLOC_ZERO_P(handle, struct tsmsm_struct); + tsmd = talloc_zero(handle, struct tsmsm_struct); if (!tsmd) { SMB_VFS_NEXT_DISCONNECT(handle); DEBUG(0,("tsmsm_connect: out of memory!\n")); diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c index 23bb35041e..200450b131 100644 --- a/source3/modules/vfs_xattr_tdb.c +++ b/source3/modules/vfs_xattr_tdb.c @@ -41,7 +41,7 @@ static NTSTATUS xattr_tdb_pull_attrs(TALLOC_CTX *mem_ctx, enum ndr_err_code ndr_err; struct tdb_xattrs *result; - if (!(result = TALLOC_ZERO_P(mem_ctx, struct tdb_xattrs))) { + if (!(result = talloc_zero(mem_ctx, struct tdb_xattrs))) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 25cdcc6970..89adf5a48d 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -173,7 +173,7 @@ static void nmbd_proxy_logon(struct nmbd_proxy_logon_context *ctx, fstring source_name; struct dgram_packet *dgram = &p->packet.dgram; - state = TALLOC_ZERO_P(ctx, struct nmbd_proxy_logon_state); + state = talloc_zero(ctx, struct nmbd_proxy_logon_state); if (!state) { DEBUG(0,("failed to allocate nmbd_proxy_logon_state\n")); return; diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 992f1b8741..fcdaf272c8 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -74,7 +74,7 @@ struct samu *samu_new( TALLOC_CTX *ctx ) { struct samu *user; - if ( !(user = TALLOC_ZERO_P( ctx, struct samu )) ) { + if ( !(user = talloc_zero( ctx, struct samu )) ) { DEBUG(0,("samuser_new: Talloc failed!\n")); return NULL; } diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 2d33d2d954..f8da0ff255 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -6480,7 +6480,7 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c /* TODO: Setup private data and free */ - if ( !(ldap_state = TALLOC_ZERO_P(*pdb_method, struct ldapsam_privates)) ) { + if ( !(ldap_state = talloc_zero(*pdb_method, struct ldapsam_privates)) ) { DEBUG(0, ("pdb_init_ldapsam_common: talloc() failed for ldapsam private_data!\n")); return NT_STATUS_NO_MEMORY; } diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 73dc0a5c6b..2cfacd3a13 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1694,7 +1694,7 @@ static NTSTATUS pdb_init_smbpasswd( struct pdb_methods **pdb_method, const char /* Setup private data and free function */ - if ( !(privates = TALLOC_ZERO_P( *pdb_method, struct smbpasswd_privates )) ) { + if ( !(privates = talloc_zero( *pdb_method, struct smbpasswd_privates )) ) { DEBUG(0, ("talloc() failed for smbpasswd private_data!\n")); return NT_STATUS_NO_MEMORY; } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 76fb6fd6de..45d4191ae7 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -919,7 +919,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx, } /* Setup a synthetic smb_filename struct */ - smb_fname_new = TALLOC_ZERO_P(mem_ctx, struct smb_filename); + smb_fname_new = talloc_zero(mem_ctx, struct smb_filename); if (!smb_fname_new) { ret = WERR_NOMEM; goto out; diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 150a3ab02d..51bd98e939 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -142,9 +142,9 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, SMB_ASSERT(strchr(name, '\\') == NULL); - if (!(regkey = TALLOC_ZERO_P(mem_ctx, struct registry_key)) || + if (!(regkey = talloc_zero(mem_ctx, struct registry_key)) || !(regkey->token = dup_nt_token(regkey, token)) || - !(regkey->key = TALLOC_ZERO_P(regkey, struct registry_key_handle))) + !(regkey->key = talloc_zero(regkey, struct registry_key_handle))) { result = WERR_NOMEM; goto done; diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index a2ae178783..54b6fe3441 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -62,7 +62,7 @@ struct regsubkey_ctr { context for internal private data. There is no longer a regval_ctr_intit() and regval_ctr_destroy() - pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the + pair of functions. Simply talloc_zero() and TALLOC_FREE() the object. **********************************************************************/ diff --git a/source3/registry/reg_util_token.c b/source3/registry/reg_util_token.c index ca0159a649..d599b3a33d 100644 --- a/source3/registry/reg_util_token.c +++ b/source3/registry/reg_util_token.c @@ -38,7 +38,7 @@ NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } - token = TALLOC_ZERO_P(mem_ctx, struct security_token); + token = talloc_zero(mem_ctx, struct security_token); if (token == NULL) { DEBUG(1, ("talloc failed\n")); status = NT_STATUS_NO_MEMORY; diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index 925ff8775a..c1d40166cc 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -498,7 +498,7 @@ static REGF_HBIN* read_hbin_block( REGF_FILE *file, off_t offset ) REGF_HBIN *hbin; uint32 record_size, curr_off, block_size, header; - if ( !(hbin = TALLOC_ZERO_P(file->mem_ctx, REGF_HBIN)) ) + if ( !(hbin = talloc_zero(file->mem_ctx, REGF_HBIN)) ) return NULL; hbin->file_off = offset; hbin->free_off = -1; @@ -1073,7 +1073,7 @@ static bool hbin_prs_key( REGF_FILE *file, REGF_HBIN *hbin, REGF_NK_REC *nk ) } } - if ( !(nk->sec_desc = TALLOC_ZERO_P( file->mem_ctx, REGF_SK_REC )) ) + if ( !(nk->sec_desc = talloc_zero( file->mem_ctx, REGF_SK_REC )) ) return False; nk->sec_desc->sk_off = nk->sk_off; if ( !hbin_prs_sk_rec( "sk_rec", sub_hbin, depth, nk->sec_desc )) @@ -1379,7 +1379,7 @@ REGF_NK_REC* regfio_rootkey( REGF_FILE *file ) if ( !file ) return NULL; - if ( !(nk = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) ) { + if ( !(nk = talloc_zero( file->mem_ctx, REGF_NK_REC )) ) { DEBUG(0,("regfio_rootkey: talloc() failed!\n")); return NULL; } @@ -1447,7 +1447,7 @@ REGF_NK_REC* regfio_rootkey( REGF_FILE *file ) return NULL; nk->subkey_index++; - if ( !(subkey = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) ) + if ( !(subkey = talloc_zero( file->mem_ctx, REGF_NK_REC )) ) return NULL; if ( !hbin_prs_key( file, hbin, subkey ) ) @@ -1465,7 +1465,7 @@ static REGF_HBIN* regf_hbin_allocate( REGF_FILE *file, uint32 block_size ) REGF_HBIN *hbin; SMB_STRUCT_STAT sbuf; - if ( !(hbin = TALLOC_ZERO_P( file->mem_ctx, REGF_HBIN )) ) + if ( !(hbin = talloc_zero( file->mem_ctx, REGF_HBIN )) ) return NULL; memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) ); @@ -1765,7 +1765,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 ) REGF_HBIN *vlist_hbin = NULL; uint32 size; - if ( !(nk = TALLOC_ZERO_P( file->mem_ctx, REGF_NK_REC )) ) + if ( !(nk = talloc_zero( file->mem_ctx, REGF_NK_REC )) ) return NULL; memcpy( nk->header, "nk", REC_HDR_SIZE ); @@ -1831,7 +1831,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 ) return NULL; } - if ( !(nk->sec_desc = TALLOC_ZERO_P( file->mem_ctx, REGF_SK_REC )) ) + if ( !(nk->sec_desc = talloc_zero( file->mem_ctx, REGF_SK_REC )) ) return NULL; /* now we have to store the security descriptor in the list and diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index bd3232d2cd..b519358558 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -177,7 +177,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(ret_creds); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } @@ -200,7 +200,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, struct samr_Password lmpassword; struct samr_Password ntpassword; - password_info = TALLOC_ZERO_P(mem_ctx, struct netr_PasswordInfo); + password_info = talloc_zero(mem_ctx, struct netr_PasswordInfo); if (!password_info) { return NT_STATUS_NO_MEMORY; } @@ -240,7 +240,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } @@ -388,12 +388,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } @@ -505,12 +505,12 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli, ZERO_STRUCT(lm); ZERO_STRUCT(nt); - logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel); + logon = talloc_zero(mem_ctx, union netr_LogonLevel); if (!logon) { return NT_STATUS_NO_MEMORY; } - network_info = TALLOC_ZERO_P(mem_ctx, struct netr_NetworkInfo); + network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); if (!network_info) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 76d2cf164b..682f35ece0 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2431,7 +2431,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host, NTSTATUS status; int fd; - result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client); + result = talloc_zero(mem_ctx, struct rpc_pipe_client); if (result == NULL) { return NT_STATUS_NO_MEMORY; } @@ -2540,7 +2540,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host, /* create tower for asking the epmapper */ - map_binding = TALLOC_ZERO_P(tmp_ctx, struct dcerpc_binding); + map_binding = talloc_zero(tmp_ctx, struct dcerpc_binding); if (map_binding == NULL) { status = NT_STATUS_NO_MEMORY; goto done; @@ -2551,7 +2551,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host, map_binding->host = host; /* needed? */ map_binding->endpoint = "0"; /* correct? needed? */ - map_tower = TALLOC_ZERO_P(tmp_ctx, struct epm_twr_t); + map_tower = talloc_zero(tmp_ctx, struct epm_twr_t); if (map_tower == NULL) { status = NT_STATUS_NO_MEMORY; goto done; @@ -2572,7 +2572,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host, } towers.twr = res_towers; - entry_handle = TALLOC_ZERO_P(tmp_ctx, struct policy_handle); + entry_handle = talloc_zero(tmp_ctx, struct policy_handle); if (entry_handle == NULL) { status = NT_STATUS_NO_MEMORY; goto done; @@ -2756,7 +2756,7 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli, return NT_STATUS_INVALID_HANDLE; } - result = TALLOC_ZERO_P(NULL, struct rpc_pipe_client); + result = talloc_zero(NULL, struct rpc_pipe_client); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c index 723760d601..486e14e268 100644 --- a/source3/rpc_server/dfs/srv_dfs_nt.c +++ b/source3/rpc_server/dfs/srv_dfs_nt.c @@ -59,7 +59,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r) return WERR_ACCESS_DENIED; } - jn = TALLOC_ZERO_P(ctx, struct junction_map); + jn = talloc_zero(ctx, struct junction_map); if (!jn) { return WERR_NOMEM; } @@ -124,7 +124,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r) return WERR_ACCESS_DENIED; } - jn = TALLOC_ZERO_P(ctx, struct junction_map); + jn = talloc_zero(ctx, struct junction_map); if (!jn) { return WERR_NOMEM; } @@ -354,7 +354,7 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r) TALLOC_CTX *ctx = talloc_tos(); bool ret; - jn = TALLOC_ZERO_P(ctx, struct junction_map); + jn = talloc_zero(ctx, struct junction_map); if (!jn) { return WERR_NOMEM; } @@ -372,28 +372,28 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r) switch (r->in.level) { case 1: - r->out.info->info1 = TALLOC_ZERO_P(ctx,struct dfs_Info1); + r->out.info->info1 = talloc_zero(ctx,struct dfs_Info1); if (!r->out.info->info1) { return WERR_NOMEM; } ret = init_reply_dfs_info_1(ctx, jn, r->out.info->info1); break; case 2: - r->out.info->info2 = TALLOC_ZERO_P(ctx,struct dfs_Info2); + r->out.info->info2 = talloc_zero(ctx,struct dfs_Info2); if (!r->out.info->info2) { return WERR_NOMEM; } ret = init_reply_dfs_info_2(ctx, jn, r->out.info->info2); break; case 3: - r->out.info->info3 = TALLOC_ZERO_P(ctx,struct dfs_Info3); + r->out.info->info3 = talloc_zero(ctx,struct dfs_Info3); if (!r->out.info->info3) { return WERR_NOMEM; } ret = init_reply_dfs_info_3(ctx, jn, r->out.info->info3); break; case 100: - r->out.info->info100 = TALLOC_ZERO_P(ctx,struct dfs_Info100); + r->out.info->info100 = talloc_zero(ctx,struct dfs_Info100); if (!r->out.info->info100) { return WERR_NOMEM; } diff --git a/source3/rpc_server/dssetup/srv_dssetup_nt.c b/source3/rpc_server/dssetup/srv_dssetup_nt.c index d90ad42137..1cf4ab8074 100644 --- a/source3/rpc_server/dssetup/srv_dssetup_nt.c +++ b/source3/rpc_server/dssetup/srv_dssetup_nt.c @@ -42,7 +42,7 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx, DEBUG(10,("fill_dsrole_dominfo_basic: enter\n")); - basic = TALLOC_ZERO_P(ctx, struct dssetup_DsRolePrimaryDomInfoBasic); + basic = talloc_zero(ctx, struct dssetup_DsRolePrimaryDomInfoBasic); if (!basic) { DEBUG(0,("fill_dsrole_dominfo_basic: out of memory\n")); return WERR_NOMEM; diff --git a/source3/rpc_server/eventlog/srv_eventlog_nt.c b/source3/rpc_server/eventlog/srv_eventlog_nt.c index b4c59ba517..16a0c97488 100644 --- a/source3/rpc_server/eventlog/srv_eventlog_nt.c +++ b/source3/rpc_server/eventlog/srv_eventlog_nt.c @@ -212,7 +212,7 @@ static NTSTATUS elog_open( struct pipes_struct * p, const char *logname, struct if ( !elog_validate_logname( logname ) ) return NT_STATUS_OBJECT_PATH_INVALID; - if ( !(elog = TALLOC_ZERO_P( NULL, EVENTLOG_INFO )) ) + if ( !(elog = talloc_zero( NULL, EVENTLOG_INFO )) ) return NT_STATUS_NO_MEMORY; talloc_set_destructor(elog, eventlog_info_destructor); diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index 48cec63094..cb9eae297c 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -628,7 +628,7 @@ NTSTATUS _lsa_QueryInfoPolicy(struct pipes_struct *p, /* return NT_STATUS_ACCESS_DENIED; */ } - info = TALLOC_ZERO_P(p->mem_ctx, union lsa_PolicyInformation); + info = talloc_zero(p->mem_ctx, union lsa_PolicyInformation); if (!info) { return NT_STATUS_NO_MEMORY; } @@ -859,7 +859,7 @@ static NTSTATUS _lsa_lookup_sids_internal(struct pipes_struct *p, } sids = talloc_array(p->mem_ctx, const struct dom_sid *, num_sids); - ref = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList); + ref = talloc_zero(p->mem_ctx, struct lsa_RefDomainList); if (sids == NULL || ref == NULL) { return NT_STATUS_NO_MEMORY; @@ -1168,7 +1168,7 @@ NTSTATUS _lsa_LookupNames(struct pipes_struct *p, flags = lsa_lookup_level_to_flags(r->in.level); - domains = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList); + domains = talloc_zero(p->mem_ctx, struct lsa_RefDomainList); if (!domains) { return NT_STATUS_NO_MEMORY; } @@ -1235,7 +1235,7 @@ NTSTATUS _lsa_LookupNames2(struct pipes_struct *p, struct lsa_TransSidArray *sid_array = NULL; uint32_t i; - sid_array = TALLOC_ZERO_P(p->mem_ctx, struct lsa_TransSidArray); + sid_array = talloc_zero(p->mem_ctx, struct lsa_TransSidArray); if (!sid_array) { return NT_STATUS_NO_MEMORY; } @@ -1310,7 +1310,7 @@ NTSTATUS _lsa_LookupNames3(struct pipes_struct *p, flags = LOOKUP_NAME_ALL; } - domains = TALLOC_ZERO_P(p->mem_ctx, struct lsa_RefDomainList); + domains = talloc_zero(p->mem_ctx, struct lsa_RefDomainList); if (!domains) { return NT_STATUS_NO_MEMORY; } @@ -2012,7 +2012,7 @@ NTSTATUS _lsa_QueryTrustedDomainInfo(struct pipes_struct *p, return status; } - info = TALLOC_ZERO_P(p->mem_ctx, union lsa_TrustedDomainInfo); + info = talloc_zero(p->mem_ctx, union lsa_TrustedDomainInfo); if (!info) { return NT_STATUS_NO_MEMORY; } @@ -2299,7 +2299,7 @@ NTSTATUS _lsa_LookupPrivDisplayName(struct pipes_struct *p, DEBUG(10,("_lsa_LookupPrivDisplayName: display name = %s\n", description)); - lsa_name = TALLOC_ZERO_P(p->mem_ctx, struct lsa_StringLarge); + lsa_name = talloc_zero(p->mem_ctx, struct lsa_StringLarge); if (!lsa_name) { return NT_STATUS_NO_MEMORY; } @@ -2597,7 +2597,7 @@ NTSTATUS _lsa_EnumPrivsAccount(struct pipes_struct *p, return status; } - *r->out.privs = priv_set = TALLOC_ZERO_P(p->mem_ctx, struct lsa_PrivilegeSet); + *r->out.privs = priv_set = talloc_zero(p->mem_ctx, struct lsa_PrivilegeSet); if (!priv_set) { return NT_STATUS_NO_MEMORY; } @@ -2801,7 +2801,7 @@ NTSTATUS _lsa_LookupPrivName(struct pipes_struct *p, return NT_STATUS_NO_SUCH_PRIVILEGE; } - lsa_name = TALLOC_ZERO_P(p->mem_ctx, struct lsa_StringLarge); + lsa_name = talloc_zero(p->mem_ctx, struct lsa_StringLarge); if (!lsa_name) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index e3c95fc06b..46789f106a 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -346,7 +346,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p, switch (r->in.level) { case 1: - info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1); + info1 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_1); W_ERROR_HAVE_NO_MEMORY(info1); info1->flags = flags; @@ -355,7 +355,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p, r->out.query->info1 = info1; break; case 2: - info2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_2); + info2 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_2); W_ERROR_HAVE_NO_MEMORY(info2); info2->flags = flags; @@ -366,7 +366,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p, r->out.query->info2 = info2; break; case 3: - info3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_3); + info3 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_3); W_ERROR_HAVE_NO_MEMORY(info3); info3->flags = flags; @@ -375,7 +375,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p, r->out.query->info3 = info3; break; case 4: - info4 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_4); + info4 = talloc_zero(p->mem_ctx, struct netr_NETLOGON_INFO_4); W_ERROR_HAVE_NO_MEMORY(info4); info4->trusted_dc_name = dc_name; @@ -1421,19 +1421,19 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p, switch (r->in.validation_level) { case 2: - r->out.validation->sam2 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo2); + r->out.validation->sam2 = talloc_zero(p->mem_ctx, struct netr_SamInfo2); if (!r->out.validation->sam2) { return NT_STATUS_NO_MEMORY; } break; case 3: - r->out.validation->sam3 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo3); + r->out.validation->sam3 = talloc_zero(p->mem_ctx, struct netr_SamInfo3); if (!r->out.validation->sam3) { return NT_STATUS_NO_MEMORY; } break; case 6: - r->out.validation->sam6 = TALLOC_ZERO_P(p->mem_ctx, struct netr_SamInfo6); + r->out.validation->sam6 = talloc_zero(p->mem_ctx, struct netr_SamInfo6); if (!r->out.validation->sam6) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index e578c77dda..f14aae540d 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -131,7 +131,7 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, DEBUG(4,("Create pipe requested %s\n", get_pipe_name_from_syntax(talloc_tos(), syntax))); - p = TALLOC_ZERO_P(mem_ctx, struct pipes_struct); + p = talloc_zero(mem_ctx, struct pipes_struct); if (!p) { DEBUG(0,("ERROR! no memory for pipes_struct!\n")); @@ -563,7 +563,7 @@ static NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *result; NTSTATUS status; - result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client); + result = talloc_zero(mem_ctx, struct rpc_pipe_client); if (result == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c index 186526edfc..9f96127c0f 100644 --- a/source3/rpc_server/samr/srv_samr_nt.c +++ b/source3/rpc_server/samr/srv_samr_nt.c @@ -842,7 +842,7 @@ NTSTATUS _samr_EnumDomainUsers(struct pipes_struct *p, return status; } - samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray); + samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray); if (!samr_array) { return NT_STATUS_NO_MEMORY; } @@ -977,7 +977,7 @@ NTSTATUS _samr_EnumDomainGroups(struct pipes_struct *p, DEBUG(5,("_samr_EnumDomainGroups: %d\n", __LINE__)); - samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray); + samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray); if (!samr_array) { return NT_STATUS_NO_MEMORY; } @@ -1055,7 +1055,7 @@ NTSTATUS _samr_EnumDomainAliases(struct pipes_struct *p, DEBUG(5,("_samr_EnumDomainAliases: sid %s\n", sid_string_dbg(&dinfo->sid))); - samr_array = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray); + samr_array = talloc_zero(p->mem_ctx, struct samr_SamArray); if (!samr_array) { return NT_STATUS_NO_MEMORY; } @@ -1578,7 +1578,7 @@ NTSTATUS _samr_QueryAliasInfo(struct pipes_struct *p, return status; } - alias_info = TALLOC_ZERO_P(p->mem_ctx, union samr_AliasInfo); + alias_info = talloc_zero(p->mem_ctx, union samr_AliasInfo); if (!alias_info) { return NT_STATUS_NO_MEMORY; } @@ -1984,12 +1984,12 @@ NTSTATUS _samr_ChangePasswordUser3(struct pipes_struct *p, time_t u_expire, u_min_age; uint32 account_policy_temp; - dominfo = TALLOC_ZERO_P(p->mem_ctx, struct samr_DomInfo1); + dominfo = talloc_zero(p->mem_ctx, struct samr_DomInfo1); if (!dominfo) { return NT_STATUS_NO_MEMORY; } - reject = TALLOC_ZERO_P(p->mem_ctx, + reject = talloc_zero(p->mem_ctx, struct userPwdChangeFailureInformation); if (!reject) { return NT_STATUS_NO_MEMORY; @@ -2288,7 +2288,7 @@ static NTSTATUS init_samr_parameters_string(TALLOC_CTX *mem_ctx, return NT_STATUS_INVALID_PARAMETER; } - r = TALLOC_ZERO_P(mem_ctx, struct lsa_BinaryString); + r = talloc_zero(mem_ctx, struct lsa_BinaryString); if (!r) { return NT_STATUS_NO_MEMORY; } @@ -2987,7 +2987,7 @@ NTSTATUS _samr_QueryUserInfo(struct pipes_struct *p, DEBUG(5,("_samr_QueryUserInfo: sid:%s\n", sid_string_dbg(&uinfo->sid))); - user_info = TALLOC_ZERO_P(p->mem_ctx, union samr_UserInfo); + user_info = talloc_zero(p->mem_ctx, union samr_UserInfo); if (!user_info) { return NT_STATUS_NO_MEMORY; } @@ -3149,7 +3149,7 @@ NTSTATUS _samr_GetGroupsForUser(struct pipes_struct *p, return result; } - rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidWithAttributeArray); + rids = talloc_zero(p->mem_ctx, struct samr_RidWithAttributeArray); if (!rids) { return NT_STATUS_NO_MEMORY; } @@ -3598,7 +3598,7 @@ NTSTATUS _samr_QueryDomainInfo(struct pipes_struct *p, return status; } - dom_info = TALLOC_ZERO_P(p->mem_ctx, union samr_DomainInfo); + dom_info = talloc_zero(p->mem_ctx, union samr_DomainInfo); if (!dom_info) { return NT_STATUS_NO_MEMORY; } @@ -4054,7 +4054,7 @@ NTSTATUS _samr_LookupDomain(struct pipes_struct *p, return NT_STATUS_INVALID_PARAMETER; } - sid = TALLOC_ZERO_P(p->mem_ctx, struct dom_sid2); + sid = talloc_zero(p->mem_ctx, struct dom_sid2); if (!sid) { return NT_STATUS_NO_MEMORY; } @@ -4095,7 +4095,7 @@ NTSTATUS _samr_EnumDomains(struct pipes_struct *p, return status; } - sam = TALLOC_ZERO_P(p->mem_ctx, struct samr_SamArray); + sam = talloc_zero(p->mem_ctx, struct samr_SamArray); if (!sam) { return NT_STATUS_NO_MEMORY; } @@ -5415,7 +5415,7 @@ NTSTATUS _samr_QueryGroupMember(struct pipes_struct *p, return status; } - rids = TALLOC_ZERO_P(p->mem_ctx, struct samr_RidAttrArray); + rids = talloc_zero(p->mem_ctx, struct samr_RidAttrArray); if (!rids) { return NT_STATUS_NO_MEMORY; } @@ -5954,7 +5954,7 @@ NTSTATUS _samr_QueryGroupInfo(struct pipes_struct *p, group_name = talloc_strdup(r, map.nt_name); group_description = talloc_strdup(r, map.comment); - info = TALLOC_ZERO_P(p->mem_ctx, union samr_GroupInfo); + info = talloc_zero(p->mem_ctx, union samr_GroupInfo); if (!info) { 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 228cb96cc0..7fd068f1af 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -600,7 +600,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, alloc_entries = num_entries - resume_handle; switch (info_ctr->level) { case 0: - ctr.ctr0 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr0); + ctr.ctr0 = talloc_zero(ctx, struct srvsvc_NetShareCtr0); W_ERROR_HAVE_NO_MEMORY(ctr.ctr0); ctr.ctr0->count = alloc_entries; @@ -617,7 +617,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1: - ctr.ctr1 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1); + ctr.ctr1 = talloc_zero(ctx, struct srvsvc_NetShareCtr1); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1); ctr.ctr1->count = alloc_entries; @@ -634,7 +634,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 2: - ctr.ctr2 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr2); + ctr.ctr2 = talloc_zero(ctx, struct srvsvc_NetShareCtr2); W_ERROR_HAVE_NO_MEMORY(ctr.ctr2); ctr.ctr2->count = alloc_entries; @@ -651,7 +651,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 501: - ctr.ctr501 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr501); + ctr.ctr501 = talloc_zero(ctx, struct srvsvc_NetShareCtr501); W_ERROR_HAVE_NO_MEMORY(ctr.ctr501); ctr.ctr501->count = alloc_entries; @@ -668,7 +668,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 502: - ctr.ctr502 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr502); + ctr.ctr502 = talloc_zero(ctx, struct srvsvc_NetShareCtr502); W_ERROR_HAVE_NO_MEMORY(ctr.ctr502); ctr.ctr502->count = alloc_entries; @@ -685,7 +685,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1004: - ctr.ctr1004 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1004); + ctr.ctr1004 = talloc_zero(ctx, struct srvsvc_NetShareCtr1004); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1004); ctr.ctr1004->count = alloc_entries; @@ -702,7 +702,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1005: - ctr.ctr1005 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1005); + ctr.ctr1005 = talloc_zero(ctx, struct srvsvc_NetShareCtr1005); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1005); ctr.ctr1005->count = alloc_entries; @@ -719,7 +719,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1006: - ctr.ctr1006 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1006); + ctr.ctr1006 = talloc_zero(ctx, struct srvsvc_NetShareCtr1006); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1006); ctr.ctr1006->count = alloc_entries; @@ -736,7 +736,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1007: - ctr.ctr1007 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1007); + ctr.ctr1007 = talloc_zero(ctx, struct srvsvc_NetShareCtr1007); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1007); ctr.ctr1007->count = alloc_entries; @@ -753,7 +753,7 @@ static WERROR init_srv_share_info_ctr(struct pipes_struct *p, break; case 1501: - ctr.ctr1501 = TALLOC_ZERO_P(ctx, struct srvsvc_NetShareCtr1501); + ctr.ctr1501 = talloc_zero(ctx, struct srvsvc_NetShareCtr1501); W_ERROR_HAVE_NO_MEMORY(ctr.ctr1501); ctr.ctr1501->count = alloc_entries; @@ -2062,7 +2062,7 @@ WERROR _srvsvc_NetRemoteTOD(struct pipes_struct *p, DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__)); - if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) ) + if ( !(tod = talloc_zero(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) ) return WERR_NOMEM; *r->out.info = tod; @@ -2189,7 +2189,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p, sd_size = ndr_size_security_descriptor(psd, 0); - sd_buf = TALLOC_ZERO_P(p->mem_ctx, struct sec_desc_buf); + sd_buf = talloc_zero(p->mem_ctx, struct sec_desc_buf); if (!sd_buf) { werr = WERR_NOMEM; goto error_exit; diff --git a/source3/rpc_server/svcctl/srv_svcctl_nt.c b/source3/rpc_server/svcctl/srv_svcctl_nt.c index b2b8a1923d..96ac399e16 100644 --- a/source3/rpc_server/svcctl/srv_svcctl_nt.c +++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c @@ -209,7 +209,7 @@ static WERROR create_open_service_handle(struct pipes_struct *p, WERROR result = WERR_OK; struct service_control_op *s_op; - if ( !(info = TALLOC_ZERO_P( NULL, SERVICE_INFO )) ) + if ( !(info = talloc_zero( NULL, SERVICE_INFO )) ) return WERR_NOMEM; /* the Service Manager has a NULL name */ diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 1f9130fecf..db2926b4a4 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -116,7 +116,7 @@ static struct aio_extra *create_aio_extra(TALLOC_CTX *mem_ctx, files_struct *fsp, size_t buflen) { - struct aio_extra *aio_ex = TALLOC_ZERO_P(mem_ctx, struct aio_extra); + struct aio_extra *aio_ex = talloc_zero(mem_ctx, struct aio_extra); if (!aio_ex) { return NULL; diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 4e9ab91eae..a3f66b36be 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -133,7 +133,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn) if (sconn->using_smb2) { /* SMB2 */ - if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) || + if (!(conn=talloc_zero(NULL, connection_struct)) || !(conn->params = talloc(conn, struct share_params))) { DEBUG(0,("TALLOC_ZERO() failed!\n")); TALLOC_FREE(conn); @@ -188,7 +188,7 @@ find_again: return NULL; } - if (!(conn=TALLOC_ZERO_P(NULL, connection_struct)) || + if (!(conn=talloc_zero(NULL, connection_struct)) || !(conn->params = talloc(conn, struct share_params))) { DEBUG(0,("TALLOC_ZERO() failed!\n")); TALLOC_FREE(conn); diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 9969693e7b..83590ea6c0 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -1342,7 +1342,7 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn, const char *mask, uint32 attr) { - struct smb_Dir *dirp = TALLOC_ZERO_P(mem_ctx, struct smb_Dir); + struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir); struct smbd_server_connection *sconn = conn->sconn; if (!dirp) { @@ -1386,7 +1386,7 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn, const char *mask, uint32 attr) { - struct smb_Dir *dirp = TALLOC_ZERO_P(mem_ctx, struct smb_Dir); + struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir); struct smbd_server_connection *sconn = conn->sconn; if (!dirp) { diff --git a/source3/smbd/message.c b/source3/smbd/message.c index 1877582d53..63b08e1262 100644 --- a/source3/smbd/message.c +++ b/source3/smbd/message.c @@ -202,7 +202,7 @@ void reply_sendstrt(struct smb_request *req) TALLOC_FREE(smbd_msg_state); - smbd_msg_state = TALLOC_ZERO_P(NULL, struct msg_state); + smbd_msg_state = talloc_zero(NULL, struct msg_state); if (smbd_msg_state == NULL) { reply_nterror(req, NT_STATUS_NO_MEMORY); diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 2ae01a95ab..af560ed19b 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -231,7 +231,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx, char *oldcwd; const char *vfs_user; - conn = TALLOC_ZERO_P(ctx, connection_struct); + conn = talloc_zero(ctx, connection_struct); if (conn == NULL) { return NT_STATUS_NO_MEMORY; } @@ -252,7 +252,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx, /* needed for smbd_vfs_init() */ - if (!(conn->params = TALLOC_ZERO_P(conn, struct share_params))) { + if (!(conn->params = talloc_zero(conn, struct share_params))) { DEBUG(0, ("TALLOC failed\n")); TALLOC_FREE(conn); return NT_STATUS_NO_MEMORY; @@ -794,7 +794,7 @@ static NTSTATUS self_ref(TALLOC_CTX *ctx, *self_referralp = True; jucn->referral_count = 1; - if((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) { + if((ref = talloc_zero(ctx, struct referral)) == NULL) { return NT_STATUS_NO_MEMORY; } @@ -899,7 +899,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx, */ jucn->referral_count = 1; - if ((ref = TALLOC_ZERO_P(ctx, struct referral)) == NULL) { + if ((ref = talloc_zero(ctx, struct referral)) == NULL) { TALLOC_FREE(pdp); return NT_STATUS_NO_MEMORY; } @@ -1233,7 +1233,7 @@ int setup_dfs_referral(connection_struct *orig_conn, pathnamep++; } - junction = TALLOC_ZERO_P(ctx, struct junction_map); + junction = talloc_zero(ctx, struct junction_map); if (!junction) { *pstatus = NT_STATUS_NO_MEMORY; talloc_destroy(ctx); @@ -1630,7 +1630,7 @@ static int form_junctions(TALLOC_CTX *ctx, jucn[cnt].comment = ""; jucn[cnt].referral_count = 1; - ref = jucn[cnt].referral_list = TALLOC_ZERO_P(ctx, struct referral); + ref = jucn[cnt].referral_list = talloc_zero(ctx, struct referral); if (jucn[cnt].referral_list == NULL) { goto out; } diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index a70f86df00..8160d5ac63 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -183,7 +183,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter, SMB_ASSERT(fsp->notify == NULL); - if (!(fsp->notify = TALLOC_ZERO_P(NULL, struct notify_change_buf))) { + if (!(fsp->notify = talloc_zero(NULL, struct notify_change_buf))) { DEBUG(0, ("talloc failed\n")); return NT_STATUS_NO_MEMORY; } diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 3098502218..3aea1625eb 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -198,7 +198,7 @@ static NTSTATUS notify_load(struct notify_context *notify, struct db_record *rec notify->seqnum = seqnum; talloc_free(notify->array); - notify->array = TALLOC_ZERO_P(notify, struct notify_array); + notify->array = talloc_zero(notify, struct notify_array); NT_STATUS_HAVE_NO_MEMORY(notify->array); if (!rec) { @@ -531,7 +531,7 @@ NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0, depth = count_chars(e.path, '/'); - listel = TALLOC_ZERO_P(notify, struct notify_list); + listel = talloc_zero(notify, struct notify_list); if (listel == NULL) { status = NT_STATUS_NO_MEMORY; goto done; diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c index cdd08904e4..1f4fc2d0a2 100644 --- a/source3/smbd/ntquotas.c +++ b/source3/smbd/ntquotas.c @@ -201,14 +201,14 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list) DEBUG(15,("quota entry for id[%s] path[%s]\n", sid_string_dbg(&sid), fsp->conn->connectpath)); - if ((tmp_list_ent=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { + if ((tmp_list_ent=talloc_zero(mem_ctx,SMB_NTQUOTA_LIST))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); *qt_list = NULL; talloc_destroy(mem_ctx); return (-1); } - if ((tmp_list_ent->quotas=TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { + if ((tmp_list_ent->quotas=talloc_zero(mem_ctx,SMB_NTQUOTA_STRUCT))==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); *qt_list = NULL; talloc_destroy(mem_ctx); @@ -241,7 +241,7 @@ void *init_quota_handle(TALLOC_CTX *mem_ctx) if (!mem_ctx) return False; - qt_handle = TALLOC_ZERO_P(mem_ctx,SMB_NTQUOTA_HANDLE); + qt_handle = talloc_zero(mem_ctx,SMB_NTQUOTA_HANDLE); if (qt_handle==NULL) { DEBUG(0,("TALLOC_ZERO() failed\n")); return NULL; diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index f0873a6b9c..5fdb07d769 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2235,7 +2235,7 @@ static void call_nt_transact_ioctl(connection_struct *conn, labels = True; } - shadow_data = TALLOC_ZERO_P(talloc_tos(), + shadow_data = talloc_zero(talloc_tos(), struct shadow_copy_data); if (shadow_data == NULL) { DEBUG(0,("TALLOC_ZERO() failed!\n")); diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index aebe64e2d8..c536306e22 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4744,7 +4744,7 @@ struct security_descriptor *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fna struct fd_handle fh; NTSTATUS status; - conn = TALLOC_ZERO_P(ctx, connection_struct); + conn = talloc_zero(ctx, connection_struct); if (conn == NULL) { DEBUG(0, ("talloc failed\n")); return NULL; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 78beb730b9..75fa69782e 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -594,7 +594,7 @@ static bool push_queued_message(struct smb_request *req, int msg_len = smb_len(req->inbuf) + 4; struct pending_message_list *msg; - msg = TALLOC_ZERO_P(NULL, struct pending_message_list); + msg = talloc_zero(NULL, struct pending_message_list); if(msg == NULL) { DEBUG(0,("push_message: malloc fail (1)\n")); diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c index 48487428de..a5b8326626 100644 --- a/source3/smbd/smb2_ioctl.c +++ b/source3/smbd/smb2_ioctl.c @@ -411,7 +411,7 @@ static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX *mem_ctx, labels = True; } - shadow_data = TALLOC_ZERO_P(talloc_tos(), + shadow_data = talloc_zero(talloc_tos(), struct shadow_copy_data); if (tevent_req_nomem(shadow_data, req)) { DEBUG(0,("TALLOC_ZERO() failed!\n")); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 6d85edf9eb..92ac78c6e9 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -590,7 +590,7 @@ static struct ea_list *read_ea_name_list(TALLOC_CTX *ctx, const char *pdata, siz size_t converted_size, offset = 0; while (offset + 2 < data_size) { - struct ea_list *eal = TALLOC_ZERO_P(ctx, struct ea_list); + struct ea_list *eal = talloc_zero(ctx, struct ea_list); unsigned int namelen = CVAL(pdata,offset); offset++; /* Go past the namelen byte. */ @@ -628,7 +628,7 @@ static struct ea_list *read_ea_name_list(TALLOC_CTX *ctx, const char *pdata, siz struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used) { - struct ea_list *eal = TALLOC_ZERO_P(ctx, struct ea_list); + struct ea_list *eal = talloc_zero(ctx, struct ea_list); uint16 val_len; unsigned int namelen; size_t converted_size; diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 8c526fa882..7be3867267 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -183,7 +183,7 @@ bool vfs_init_custom(connection_struct *conn, const char *vfs_object) DEBUGADD(5,("Successfully loaded vfs module [%s] with the new modules system\n", vfs_object)); - handle = TALLOC_ZERO_P(conn, vfs_handle_struct); + handle = talloc_zero(conn, vfs_handle_struct); if (!handle) { DEBUG(0,("TALLOC_ZERO() failed!\n")); goto fail; diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 572fec1f42..490dd2bd52 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -469,7 +469,7 @@ int main(int argc, char *argv[]) /* some basic initialization stuff */ sec_init(); - vfs.conn = TALLOC_ZERO_P(NULL, connection_struct); + vfs.conn = talloc_zero(NULL, connection_struct); 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.c b/source3/utils/net_rpc.c index 849eec3a67..26aed240a1 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -3431,7 +3431,7 @@ static WERROR get_share_info(struct net_context *c, { struct srvsvc_NetShareCtr1 *ctr1; - ctr1 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr1); + ctr1 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr1); W_ERROR_HAVE_NO_MEMORY(ctr1); ctr1->count = 1; @@ -3445,7 +3445,7 @@ static WERROR get_share_info(struct net_context *c, { struct srvsvc_NetShareCtr2 *ctr2; - ctr2 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr2); + ctr2 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr2); W_ERROR_HAVE_NO_MEMORY(ctr2); ctr2->count = 1; @@ -3459,7 +3459,7 @@ static WERROR get_share_info(struct net_context *c, { struct srvsvc_NetShareCtr502 *ctr502; - ctr502 = TALLOC_ZERO_P(mem_ctx, struct srvsvc_NetShareCtr502); + ctr502 = talloc_zero(mem_ctx, struct srvsvc_NetShareCtr502); W_ERROR_HAVE_NO_MEMORY(ctr502); ctr502->count = 1; diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 77b15a45c7..929273dd79 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -1451,7 +1451,7 @@ static NTSTATUS rpc_registry_getsd_internal(struct net_context *c, return status; } - sd = TALLOC_ZERO_P(mem_ctx, struct KeySecurityData); + sd = talloc_zero(mem_ctx, struct KeySecurityData); if (!sd) { status = NT_STATUS_NO_MEMORY; goto out; diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index cf15f038ca..65b518074b 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -216,7 +216,7 @@ static NTSTATUS idmap_ad_initialize(struct idmap_domain *dom) char *config_option; const char *schema_mode = NULL; - ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context); + ctx = talloc_zero(dom, struct idmap_ad_context); if (ctx == NULL) { DEBUG(0, ("Out of memory!\n")); return NT_STATUS_NO_MEMORY; @@ -736,7 +736,7 @@ static NTSTATUS nss_ad_generic_init(struct nss_domain_entry *e, if (e->state != NULL) { dom = talloc_get_type(e->state, struct idmap_domain); } else { - dom = TALLOC_ZERO_P(e, struct idmap_domain); + dom = talloc_zero(e, struct idmap_domain); if (dom == NULL) { DEBUG(0, ("Out of memory!\n")); return NT_STATUS_NO_MEMORY; @@ -756,7 +756,7 @@ static NTSTATUS nss_ad_generic_init(struct nss_domain_entry *e, ctx = talloc_get_type(dom->private_data, struct idmap_ad_context); } else { - ctx = TALLOC_ZERO_P(dom, struct idmap_ad_context); + ctx = talloc_zero(dom, struct idmap_ad_context); if (ctx == NULL) { DEBUG(0, ("Out of memory!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/winbindd/idmap_adex/cell_util.c b/source3/winbindd/idmap_adex/cell_util.c index 9c50f73c41..194544086b 100644 --- a/source3/winbindd/idmap_adex/cell_util.c +++ b/source3/winbindd/idmap_adex/cell_util.c @@ -110,7 +110,7 @@ static NTSTATUS cell_lookup_forest(struct likewise_cell *c) return NT_STATUS_INVALID_PARAMETER; } - if ((gc = TALLOC_ZERO_P(NULL, struct gc_info)) == NULL) { + if ((gc = talloc_zero(NULL, struct gc_info)) == NULL) { nt_status = NT_STATUS_NO_MEMORY; BAIL_ON_NTSTATUS_ERROR(nt_status); } diff --git a/source3/winbindd/idmap_adex/domain_util.c b/source3/winbindd/idmap_adex/domain_util.c index 4d2b44ff31..99dc0cca65 100644 --- a/source3/winbindd/idmap_adex/domain_util.c +++ b/source3/winbindd/idmap_adex/domain_util.c @@ -71,7 +71,7 @@ static NTSTATUS dc_add_domain(const char *domain) return NT_STATUS_OK; } - dc = TALLOC_ZERO_P(NULL, struct dc_info); + dc = talloc_zero(NULL, struct dc_info); BAIL_ON_PTR_ERROR(dc, nt_status); dc->dns_name = talloc_strdup(dc, domain); diff --git a/source3/winbindd/idmap_adex/gc_util.c b/source3/winbindd/idmap_adex/gc_util.c index b16aa79997..461a2e679b 100644 --- a/source3/winbindd/idmap_adex/gc_util.c +++ b/source3/winbindd/idmap_adex/gc_util.c @@ -191,7 +191,7 @@ static NTSTATUS gc_add_forest(const char *domain) return NT_STATUS_OK; } - if ((gc = TALLOC_ZERO_P(NULL, struct gc_info)) == NULL) { + if ((gc = talloc_zero(NULL, struct gc_info)) == NULL) { nt_status = NT_STATUS_NO_MEMORY; BAIL_ON_NTSTATUS_ERROR(nt_status); } diff --git a/source3/winbindd/idmap_adex/likewise_cell.c b/source3/winbindd/idmap_adex/likewise_cell.c index 0914132b93..0e544e90f7 100644 --- a/source3/winbindd/idmap_adex/likewise_cell.c +++ b/source3/winbindd/idmap_adex/likewise_cell.c @@ -85,7 +85,7 @@ static struct likewise_cell *_lw_cell_list = NULL; /* Each cell struct is a TALLOC_CTX* */ - c = TALLOC_ZERO_P(NULL, struct likewise_cell); + c = talloc_zero(NULL, struct likewise_cell); if (!c) { DEBUG(0,("cell_new: memory allocation failure!\n")); return NULL; diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 80d8ed1ec2..0e1750d7c4 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -377,7 +377,7 @@ static struct autorid_global_config *idmap_autorid_loadconfig(TALLOC_CTX * ctx) return NULL; } - cfg = TALLOC_ZERO_P(ctx, struct autorid_global_config); + cfg = talloc_zero(ctx, struct autorid_global_config); if (!cfg) { return NULL; } @@ -446,7 +446,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom) goto error; } - config = TALLOC_ZERO_P(frame, struct autorid_global_config); + config = talloc_zero(dom, struct autorid_global_config); if (!config) { DEBUG(0, ("Out of memory!\n")); status = NT_STATUS_NO_MEMORY; diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index a9cb4fc3c2..10d9d2e8b6 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -443,7 +443,7 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom) return NT_STATUS_FILE_IS_OFFLINE; } - ctx = TALLOC_ZERO_P(dom, struct idmap_ldap_context); + ctx = talloc_zero(dom, struct idmap_ldap_context); if ( ! ctx) { DEBUG(0, ("Out of memory!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/winbindd/idmap_rid.c b/source3/winbindd/idmap_rid.c index 8bb63fd534..edc5e16774 100644 --- a/source3/winbindd/idmap_rid.c +++ b/source3/winbindd/idmap_rid.c @@ -41,7 +41,7 @@ static NTSTATUS idmap_rid_initialize(struct idmap_domain *dom) struct idmap_rid_context *ctx; char *config_option = NULL; - ctx = TALLOC_ZERO_P(dom, struct idmap_rid_context); + ctx = talloc_zero(dom, struct idmap_rid_context); if (ctx == NULL) { DEBUG(0, ("Out of memory!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/winbindd/nss_info.c b/source3/winbindd/nss_info.c index 77ac421d55..a3f95c6493 100644 --- a/source3/winbindd/nss_info.c +++ b/source3/winbindd/nss_info.c @@ -118,7 +118,7 @@ static NTSTATUS nss_domain_list_add_domain(const char *domain, { struct nss_domain_entry *nss_domain; - nss_domain = TALLOC_ZERO_P(nss_domain_list, struct nss_domain_entry); + nss_domain = talloc_zero(nss_domain_list, struct nss_domain_entry); if (!nss_domain) { DEBUG(0, ("nss_domain_list_add_domain: talloc() failure!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c index 4832a62f12..f3fac6c630 100644 --- a/source3/winbindd/wb_lookupsids.c +++ b/source3/winbindd/wb_lookupsids.c @@ -133,7 +133,7 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - state->res_domains = TALLOC_ZERO_P(state, struct lsa_RefDomainList); + state->res_domains = talloc_zero(state, struct lsa_RefDomainList); if (tevent_req_nomem(state->res_domains, req)) { return tevent_req_post(req, ev); } @@ -143,7 +143,7 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - state->res_names = TALLOC_ZERO_P(state, struct lsa_TransNameArray); + state->res_names = talloc_zero(state, struct lsa_TransNameArray); if (tevent_req_nomem(state->res_names, req)) { return tevent_req_post(req, ev); } diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 8c6d91e628..3d29e3fd51 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -785,7 +785,7 @@ static void new_connection(int listen_sock, bool privileged) /* Create new connection structure */ - if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) { + if ((state = talloc_zero(NULL, struct winbindd_cli_state)) == NULL) { close(sock); return; } diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index 7480db6a12..5e79a96ca7 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -908,7 +908,7 @@ static NTSTATUS winbindd_add_memory_creds_internal(const char *username, return winbindd_replace_memory_creds_internal(memcredp, pass); } - memcredp = TALLOC_ZERO_P(NULL, struct WINBINDD_MEMORY_CREDS); + memcredp = talloc_zero(NULL, struct WINBINDD_MEMORY_CREDS); if (!memcredp) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index daa8d70d79..9f82737544 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -1483,7 +1483,7 @@ static bool fork_domain_child(struct winbindd_child *child) child->domain->startup = False; } - pfds = TALLOC_ZERO_P(talloc_tos(), struct pollfd); + pfds = talloc_zero(talloc_tos(), struct pollfd); if (pfds == NULL) { DEBUG(1, ("talloc failed\n")); _exit(1); diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index df8d7b52c2..bb1aa04bfa 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -1066,7 +1066,7 @@ static NTSTATUS rpc_try_lookup_sids3(TALLOC_CTX *mem_ctx, if (NT_STATUS_IS_ERR(result)) { return result; } - names = TALLOC_ZERO_P(mem_ctx, struct lsa_TransNameArray); + names = talloc_zero(mem_ctx, struct lsa_TransNameArray); if (names == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1111,7 +1111,7 @@ NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx, return status; } - names = TALLOC_ZERO_P(mem_ctx, struct lsa_TransNameArray); + names = talloc_zero(mem_ctx, struct lsa_TransNameArray); if (names == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 63cb2d2f02..7dff138fc1 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -261,7 +261,7 @@ static void add_trusted_domains( struct winbindd_domain *domain ) struct trustdom_state *state; struct tevent_req *req; - state = TALLOC_ZERO_P(NULL, struct trustdom_state); + state = talloc_zero(NULL, struct trustdom_state); if (state == NULL) { DEBUG(0, ("talloc failed\n")); return; |