diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-20 17:59:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:14 -0500 |
commit | fb5362c069b5b6548478b2217a0519c56d856705 (patch) | |
tree | 11c9ed652475e840dd24e8fc46c7942a322acf4b /source3/libmsrpc | |
parent | 2cf38b62c5d0169385dd9ddc76d9619c14cbbf13 (diff) | |
download | samba-fb5362c069b5b6548478b2217a0519c56d856705.tar.gz samba-fb5362c069b5b6548478b2217a0519c56d856705.tar.bz2 samba-fb5362c069b5b6548478b2217a0519c56d856705.zip |
r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
Diffstat (limited to 'source3/libmsrpc')
-rw-r--r-- | source3/libmsrpc/cac_lsarpc.c | 6 | ||||
-rw-r--r-- | source3/libmsrpc/cac_samr.c | 42 | ||||
-rw-r--r-- | source3/libmsrpc/cac_svcctl.c | 2 | ||||
-rw-r--r-- | source3/libmsrpc/cac_winreg.c | 12 | ||||
-rw-r--r-- | source3/libmsrpc/libmsrpc_internal.c | 14 |
5 files changed, 38 insertions, 38 deletions
diff --git a/source3/libmsrpc/cac_lsarpc.c b/source3/libmsrpc/cac_lsarpc.c index b157f33c69..bfd58ed1ec 100644 --- a/source3/libmsrpc/cac_lsarpc.c +++ b/source3/libmsrpc/cac_lsarpc.c @@ -424,7 +424,7 @@ int cac_LsaFetchSid(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaFetchSi op->out.local_sid->domain = dom_name; sid_copy(&op->out.local_sid->sid, local_sid); - talloc_free(local_sid); + TALLOC_FREE(local_sid); } domain: @@ -453,7 +453,7 @@ domain: op->out.domain_sid->domain = dom_name; sid_copy(&op->out.domain_sid->sid, domain_sid); - talloc_free(domain_sid); + TALLOC_FREE(domain_sid); } done: @@ -816,7 +816,7 @@ int cac_LsaOpenAccount(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpen hnd->status = rpccli_lsa_open_account(pipe_hnd, mem_ctx, op->in.pol, op->in.sid, op->in.access, user_pol); if(!NT_STATUS_IS_OK(hnd->status)) { - talloc_free(user_pol); + TALLOC_FREE(user_pol); return CAC_FAILURE; } diff --git a/source3/libmsrpc/cac_samr.c b/source3/libmsrpc/cac_samr.c index bf34ec55b8..7f39e76813 100644 --- a/source3/libmsrpc/cac_samr.c +++ b/source3/libmsrpc/cac_samr.c @@ -300,7 +300,7 @@ int cac_SamOpenUser(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenUse return CAC_FAILURE; } - talloc_free(rid_types); + TALLOC_FREE(rid_types); } else { @@ -518,8 +518,8 @@ int cac_SamGetNamesFromRids(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa map_out[i].rid = op->in.rids[i]; } - talloc_free(names_out); - talloc_free(name_types_out); + TALLOC_FREE(names_out); + TALLOC_FREE(name_types_out); op->out.num_names = num_names_out; op->out.map = map_out; @@ -602,8 +602,8 @@ int cac_SamGetRidsFromNames(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa op->out.num_rids = num_rids_out; op->out.map = map_out; - talloc_free(rids_out); - talloc_free(rid_types_out); + TALLOC_FREE(rids_out); + TALLOC_FREE(rid_types_out); if(NT_STATUS_EQUAL(hnd->status, STATUS_SOME_UNMAPPED)) return CAC_PARTIAL_SUCCESS; @@ -665,7 +665,7 @@ int cac_SamGetGroupsForUser(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Sa attr_out[i] = groups[i].attr; } - talloc_free(groups); + TALLOC_FREE(groups); op->out.num_groups = num_groups_out; op->out.rids = rids_out; @@ -941,7 +941,7 @@ int cac_SamClearGroupMembers(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_H result = CAC_FAILURE; } - talloc_free(attr); + TALLOC_FREE(attr); return result; } @@ -1040,24 +1040,24 @@ int cac_SamEnumGroups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnumG names_out = talloc_array(mem_ctx, char *, num_groups_out); if(!names_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); + TALLOC_FREE(acct_buf); return CAC_FAILURE; } desc_out = talloc_array(mem_ctx, char *, num_groups_out); if(!desc_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); - talloc_free(names_out); + TALLOC_FREE(acct_buf); + TALLOC_FREE(names_out); return CAC_FAILURE; } rids_out = talloc_array(mem_ctx, uint32, num_groups_out); if(!rids_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); - talloc_free(names_out); - talloc_free(desc_out); + TALLOC_FREE(acct_buf); + TALLOC_FREE(names_out); + TALLOC_FREE(desc_out); return CAC_FAILURE; } @@ -1135,24 +1135,24 @@ int cac_SamEnumAliases(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnum names_out = talloc_array(mem_ctx, char *, num_als_out); if(!names_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); + TALLOC_FREE(acct_buf); return CAC_FAILURE; } desc_out = talloc_array(mem_ctx, char *, num_als_out); if(!desc_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); - talloc_free(names_out); + TALLOC_FREE(acct_buf); + TALLOC_FREE(names_out); return CAC_FAILURE; } rids_out = talloc_array(mem_ctx, uint32, num_als_out); if(!rids_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(acct_buf); - talloc_free(names_out); - talloc_free(desc_out); + TALLOC_FREE(acct_buf); + TALLOC_FREE(names_out); + TALLOC_FREE(desc_out); return CAC_FAILURE; } @@ -1438,7 +1438,7 @@ int cac_SamClearAliasMembers(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_H result = CAC_FAILURE; } - talloc_free(sid); + TALLOC_FREE(sid); return result; } @@ -2405,7 +2405,7 @@ int cac_SamFlush(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamFlush *op) /*this function does not use an output parameter to make it as convenient as possible to use*/ *op->in.dom_hnd = *od.out.dom_hnd; - talloc_free(od.out.dom_hnd); + TALLOC_FREE(od.out.dom_hnd); return CAC_SUCCESS; } diff --git a/source3/libmsrpc/cac_svcctl.c b/source3/libmsrpc/cac_svcctl.c index 2651be64ab..83dc036493 100644 --- a/source3/libmsrpc/cac_svcctl.c +++ b/source3/libmsrpc/cac_svcctl.c @@ -154,7 +154,7 @@ int cac_SvcEnumServices(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcEnu return CAC_FAILURE; } - talloc_free(svc_buf); + TALLOC_FREE(svc_buf); op->out.num_services = num_svc_out; diff --git a/source3/libmsrpc/cac_winreg.c b/source3/libmsrpc/cac_winreg.c index 1d60cc8fb2..4c24671a38 100644 --- a/source3/libmsrpc/cac_winreg.c +++ b/source3/libmsrpc/cac_winreg.c @@ -244,15 +244,15 @@ int cac_RegEnumKeys(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumKey class_names_out = TALLOC_ARRAY(mem_ctx, char *, op->in.max_keys); if(!class_names_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(key_names_out); + TALLOC_FREE(key_names_out); return CAC_FAILURE; } mod_times_out = TALLOC_ARRAY(mem_ctx, time_t, op->in.max_keys); if(!mod_times_out) { hnd->status = NT_STATUS_NO_MEMORY; - talloc_free(key_names_out); - talloc_free(class_names_out); + TALLOC_FREE(key_names_out); + TALLOC_FREE(class_names_out); return CAC_FAILURE; } @@ -675,15 +675,15 @@ int cac_RegEnumValues(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumV values_out = talloc_array(mem_ctx, REG_VALUE_DATA *, op->in.max_values); if(!values_out) { - talloc_free(types_out); + TALLOC_FREE(types_out); hnd->status = NT_STATUS_NO_MEMORY; return CAC_FAILURE; } val_names_out = talloc_array(mem_ctx, char *, op->in.max_values); if(!val_names_out) { - talloc_free(types_out); - talloc_free(values_out); + TALLOC_FREE(types_out); + TALLOC_FREE(values_out); hnd->status = NT_STATUS_NO_MEMORY; return CAC_FAILURE; } diff --git a/source3/libmsrpc/libmsrpc_internal.c b/source3/libmsrpc/libmsrpc_internal.c index 6a524cdb03..b52bd0d788 100644 --- a/source3/libmsrpc/libmsrpc_internal.c +++ b/source3/libmsrpc/libmsrpc_internal.c @@ -163,12 +163,12 @@ RPC_DATA_BLOB *cac_MakeRpcDataBlob(TALLOC_CTX *mem_ctx, uint32 data_type, REG_VA break; default: - talloc_free(blob); + TALLOC_FREE(blob); blob = NULL; } if(!(blob->buffer)) { - talloc_free(blob); + TALLOC_FREE(blob); return NULL; } @@ -226,7 +226,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV case REG_SZ: data->reg_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len); if(!data->reg_sz) { - talloc_free(data); + TALLOC_FREE(data); errno = ENOMEM; data = NULL; } @@ -237,7 +237,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV data->reg_expand_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len); if(!data->reg_expand_sz) { - talloc_free(data); + TALLOC_FREE(data); errno = ENOMEM; data = NULL; } @@ -251,7 +251,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV data->reg_binary.data = talloc_memdup(mem_ctx, buf.buffer, size); if(!data->reg_binary.data) { - talloc_free(data); + TALLOC_FREE(data); errno = ENOMEM; data = NULL; } @@ -281,7 +281,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV strings = talloc_array(mem_ctx, char *, num_strings); if(!strings) { errno = ENOMEM; - talloc_free(data); + TALLOC_FREE(data); break; } @@ -313,7 +313,7 @@ REG_VALUE_DATA *cac_MakeRegValueData(TALLOC_CTX *mem_ctx, uint32 data_type, REGV break; default: - talloc_free(data); + TALLOC_FREE(data); data = NULL; } |