From 12ba88574bf91bdcc4447bfc3d429b799064bfd9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 27 Apr 2007 23:18:41 +0000 Subject: r22542: Move over to using the _strict varients of the talloc calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592) --- source3/libmsrpc/cac_samr.c | 18 +++++++++--------- source3/libmsrpc/cac_winreg.c | 6 +++--- source3/libmsrpc/libmsrpc_internal.c | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'source3/libmsrpc') diff --git a/source3/libmsrpc/cac_samr.c b/source3/libmsrpc/cac_samr.c index e85142af90..e50fb474f5 100644 --- a/source3/libmsrpc/cac_samr.c +++ b/source3/libmsrpc/cac_samr.c @@ -176,7 +176,7 @@ DOM_SID *cac_get_domain_sid( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, if ( !fs.out.domain_sid ) return NULL; - sid = ( DOM_SID * ) talloc_memdup( mem_ctx, + sid = ( DOM_SID * ) TALLOC_MEMDUP( mem_ctx, &( fs.out.domain_sid->sid ), sizeof( DOM_SID ) ); @@ -718,13 +718,13 @@ int cac_SamGetGroupsForUser( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, return CAC_FAILURE; - rids_out = talloc_array( mem_ctx, uint32, num_groups_out ); + rids_out = TALLOC_ARRAY( mem_ctx, uint32, num_groups_out ); if ( !rids_out ) { hnd->status = NT_STATUS_NO_MEMORY; return CAC_FAILURE; } - attr_out = talloc_array( mem_ctx, uint32, num_groups_out ); + attr_out = TALLOC_ARRAY( mem_ctx, uint32, num_groups_out ); if ( !attr_out ) { hnd->status = NT_STATUS_NO_MEMORY; return CAC_FAILURE; @@ -1153,14 +1153,14 @@ int cac_SamEnumGroups( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, return CAC_FAILURE; } - names_out = talloc_array( mem_ctx, char *, num_groups_out ); + names_out = TALLOC_ARRAY( mem_ctx, char *, num_groups_out ); if ( !names_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); return CAC_FAILURE; } - desc_out = talloc_array( mem_ctx, char *, num_groups_out ); + desc_out = TALLOC_ARRAY( mem_ctx, char *, num_groups_out ); if ( !desc_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); @@ -1168,7 +1168,7 @@ int cac_SamEnumGroups( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, return CAC_FAILURE; } - rids_out = talloc_array( mem_ctx, uint32, num_groups_out ); + rids_out = TALLOC_ARRAY( mem_ctx, uint32, num_groups_out ); if ( !rids_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); @@ -1256,14 +1256,14 @@ int cac_SamEnumAliases( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, NT_STATUS_V( STATUS_MORE_ENTRIES ) ) return CAC_FAILURE; - names_out = talloc_array( mem_ctx, char *, num_als_out ); + names_out = TALLOC_ARRAY( mem_ctx, char *, num_als_out ); if ( !names_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); return CAC_FAILURE; } - desc_out = talloc_array( mem_ctx, char *, num_als_out ); + desc_out = TALLOC_ARRAY( mem_ctx, char *, num_als_out ); if ( !desc_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); @@ -1271,7 +1271,7 @@ int cac_SamEnumAliases( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, return CAC_FAILURE; } - rids_out = talloc_array( mem_ctx, uint32, num_als_out ); + rids_out = TALLOC_ARRAY( mem_ctx, uint32, num_als_out ); if ( !rids_out ) { hnd->status = NT_STATUS_NO_MEMORY; TALLOC_FREE( acct_buf ); diff --git a/source3/libmsrpc/cac_winreg.c b/source3/libmsrpc/cac_winreg.c index 74156be63f..ee9d16aa64 100644 --- a/source3/libmsrpc/cac_winreg.c +++ b/source3/libmsrpc/cac_winreg.c @@ -775,14 +775,14 @@ int cac_RegEnumValues( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, } /*we need to assume that the max number of values will be enumerated */ - types_out = talloc_array( mem_ctx, uint32, op->in.max_values ); + types_out = TALLOC_ARRAY( mem_ctx, uint32, op->in.max_values ); if ( !types_out ) { hnd->status = NT_STATUS_NO_MEMORY; return CAC_FAILURE; } - values_out = talloc_array( mem_ctx, REG_VALUE_DATA *, + values_out = TALLOC_ARRAY( mem_ctx, REG_VALUE_DATA *, op->in.max_values ); if ( !values_out ) { @@ -791,7 +791,7 @@ int cac_RegEnumValues( CacServerHandle * hnd, TALLOC_CTX * mem_ctx, return CAC_FAILURE; } - val_names_out = talloc_array( mem_ctx, char *, op->in.max_values ); + val_names_out = TALLOC_ARRAY( mem_ctx, char *, op->in.max_values ); if ( !val_names_out ) { TALLOC_FREE( types_out ); diff --git a/source3/libmsrpc/libmsrpc_internal.c b/source3/libmsrpc/libmsrpc_internal.c index b9eb5a40e9..a86cde178d 100644 --- a/source3/libmsrpc/libmsrpc_internal.c +++ b/source3/libmsrpc/libmsrpc_internal.c @@ -200,7 +200,7 @@ char *cac_unistr_to_str( TALLOC_CTX * mem_ctx, uint16 * src, int num_bytes ) /*need room for a '\0' */ str_len++; - buf = talloc_array( mem_ctx, char, str_len ); + buf = TALLOC_ARRAY( mem_ctx, char, str_len ); if ( !buf ) { return NULL; @@ -265,7 +265,7 @@ REG_VALUE_DATA *cac_MakeRegValueData( TALLOC_CTX * mem_ctx, uint32 data_type, data->reg_binary.data_length = size; data->reg_binary.data = - ( uint8 * ) talloc_memdup( mem_ctx, buf.buffer, + ( uint8 * ) TALLOC_MEMDUP( mem_ctx, buf.buffer, size ); if ( !data->reg_binary.data ) { TALLOC_FREE( data ); @@ -296,7 +296,7 @@ REG_VALUE_DATA *cac_MakeRegValueData( TALLOC_CTX * mem_ctx, uint32 data_type, break; } - strings = talloc_array( mem_ctx, char *, num_strings ); + strings = TALLOC_ARRAY( mem_ctx, char *, num_strings ); if ( !strings ) { errno = ENOMEM; @@ -424,7 +424,7 @@ char *talloc_unistr2_to_ascii( TALLOC_CTX * mem_ctx, UNISTR2 str ) if ( !mem_ctx ) return NULL; - buf = talloc_array( mem_ctx, char, ( str.uni_str_len + 1 ) ); + buf = TALLOC_ARRAY( mem_ctx, char, ( str.uni_str_len + 1 ) ); if ( !buf ) return NULL; @@ -514,7 +514,7 @@ CacUserInfo *cac_MakeUserInfo( TALLOC_CTX * mem_ctx, SAM_USERINFO_CTR * ctr ) memcpy( info->lm_password, id21->lm_pwd, 8 ); info->logon_hours = - ( LOGON_HRS * ) talloc_memdup( mem_ctx, &( id21->logon_hrs ), + ( LOGON_HRS * ) TALLOC_MEMDUP( mem_ctx, &( id21->logon_hrs ), sizeof( LOGON_HRS ) ); if ( !info->logon_hours ) return NULL; -- cgit