summaryrefslogtreecommitdiff
path: root/source4/lib/registry/common/reg_interface.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-04 02:09:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:30 -0500
commit23e6e07b280983b2ccdf60deac3c32584af16140 (patch)
tree642179d98466d364d822a58908511f66156af796 /source4/lib/registry/common/reg_interface.c
parent16788f27a8f56f39f6d272427655b9869d6c3005 (diff)
downloadsamba-23e6e07b280983b2ccdf60deac3c32584af16140.tar.gz
samba-23e6e07b280983b2ccdf60deac3c32584af16140.tar.bz2
samba-23e6e07b280983b2ccdf60deac3c32584af16140.zip
r10020: Support for malloc / realloc / free in HBIN blocks
Initial support for adding keys (still broken though) (This used to be commit ff8d3a27c1b9bb37de39e7d7b974702b2b8c4437)
Diffstat (limited to 'source4/lib/registry/common/reg_interface.c')
-rw-r--r--source4/lib/registry/common/reg_interface.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 5297b1b3cf..ddd4ecbe93 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -409,6 +409,11 @@ WERROR reg_key_add_name(TALLOC_CTX *mem_ctx, struct registry_key *parent, const
error = parent->hive->functions->add_key(mem_ctx, parent, name, access_mask, desc, newkey);
if(!W_ERROR_IS_OK(error)) return error;
+
+ if (!*newkey) {
+ DEBUG(0, ("Backend returned WERR_OK, but didn't specify key!\n"));
+ return WERR_GENERAL_FAILURE;
+ }
(*newkey)->hive = parent->hive;
(*newkey)->backend_data = talloc_asprintf(mem_ctx, "%s\\%s", parent->path, name);