summaryrefslogtreecommitdiff
path: root/source4/lib/registry/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-27 07:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:15 -0500
commit759da3b915e2006d4c87b5ace47f399accd9ce91 (patch)
tree6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a /source4/lib/registry/common
parent1e42cacf6a8643bd633f631c212d71760852abbc (diff)
downloadsamba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.gz
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.bz2
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.zip
r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
Diffstat (limited to 'source4/lib/registry/common')
-rw-r--r--source4/lib/registry/common/reg_interface.c18
-rw-r--r--source4/lib/registry/common/reg_util.c6
2 files changed, 12 insertions, 12 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 442b34bc13..8385cef108 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -44,7 +44,7 @@ NTSTATUS registry_register(const void *_hive_ops)
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- entry = talloc_p(talloc_autofree_context(), struct reg_init_function_entry);
+ entry = talloc(talloc_autofree_context(), struct reg_init_function_entry);
entry->hive_functions = hive_ops;
DLIST_ADD(backends, entry);
@@ -93,8 +93,8 @@ static struct {
int reg_list_predefs(TALLOC_CTX *mem_ctx, char ***predefs, uint32_t **hkeys)
{
int i;
- *predefs = talloc_array_p(mem_ctx, char *, ARRAY_SIZE(predef_names));
- *hkeys = talloc_array_p(mem_ctx, uint32_t, ARRAY_SIZE(predef_names));
+ *predefs = talloc_array(mem_ctx, char *, ARRAY_SIZE(predef_names));
+ *hkeys = talloc_array(mem_ctx, uint32_t, ARRAY_SIZE(predef_names));
for (i = 0; predef_names[i].name; i++) {
(*predefs)[i] = talloc_strdup(mem_ctx, predef_names[i].name);
@@ -129,7 +129,7 @@ WERROR reg_get_predefined_key_by_name(struct registry_context *ctx, const char *
WERROR reg_close (struct registry_context *ctx)
{
- talloc_destroy(ctx);
+ talloc_free(ctx);
return WERR_OK;
}
@@ -165,7 +165,7 @@ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, const char *lo
return WERR_NOT_SUPPORTED;
}
- rethive = talloc_p(parent_ctx, struct registry_hive);
+ rethive = talloc(parent_ctx, struct registry_hive);
rethive->location = location?talloc_strdup(rethive, location):NULL;
rethive->functions = entry->hive_functions;
rethive->backend_data = NULL;
@@ -277,7 +277,7 @@ WERROR reg_key_num_subkeys(struct registry_key *key, int *count)
TALLOC_CTX *mem_ctx = talloc_init("num_subkeys");
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, key, i, &dest)); i++);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*count = i;
if(W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) error = WERR_OK;
@@ -303,7 +303,7 @@ WERROR reg_key_num_values(struct registry_key *key, int *count)
TALLOC_CTX *mem_ctx = talloc_init("num_subkeys");
for(i = 0; W_ERROR_IS_OK(error = key->hive->functions->get_value_by_index(mem_ctx, key, i, &dest)); i++);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
*count = i;
if(W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) error = WERR_OK;
@@ -490,7 +490,7 @@ WERROR reg_key_subkeysizes(struct registry_key *key, uint32 *max_subkeylen, uint
i++;
} while (W_ERROR_IS_OK(error));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_OK;
}
@@ -517,7 +517,7 @@ WERROR reg_key_valuesizes(struct registry_key *key, uint32 *max_valnamelen, uint
i++;
} while (W_ERROR_IS_OK(error));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return WERR_OK;
}
diff --git a/source4/lib/registry/common/reg_util.c b/source4/lib/registry/common/reg_util.c
index ef46dd6174..b11b24151e 100644
--- a/source4/lib/registry/common/reg_util.c
+++ b/source4/lib/registry/common/reg_util.c
@@ -99,7 +99,7 @@ char *reg_val_description(TALLOC_CTX *mem_ctx, struct registry_value *val)
BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *data_str, struct registry_value **value)
{
int i;
- *value = talloc_p(mem_ctx, struct registry_value);
+ *value = talloc(mem_ctx, struct registry_value);
(*value)->data_type = -1;
/* Find the correct type */
@@ -123,7 +123,7 @@ BOOL reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, const char *da
break;
case REG_DWORD:
(*value)->data_len = sizeof(uint32);
- (*value)->data_blk = talloc_p(mem_ctx, uint32);
+ (*value)->data_blk = talloc(mem_ctx, uint32);
*((uint32 *)(*value)->data_blk) = strtol(data_str, NULL, 0);
break;
@@ -264,7 +264,7 @@ WERROR reg_key_del_abs(struct registry_context *ctx, const char *path)
error = reg_key_del(parent, n);
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return error;
}