summaryrefslogtreecommitdiff
path: root/source4/lib/registry/local.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/local.c')
-rw-r--r--source4/lib/registry/local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c
index 5789a94a6d..1ed4f0262e 100644
--- a/source4/lib/registry/local.c
+++ b/source4/lib/registry/local.c
@@ -321,7 +321,7 @@ WERROR reg_mount_hive(struct registry_context *rctx,
mp->path.predefined_key = key_id;
mp->prev = mp->next = NULL;
mp->key = hive_key;
- if (elements != NULL) {
+ if (elements != NULL && str_list_length(elements) != 0) {
mp->path.elements = talloc_array(mp, const char *,
str_list_length(elements));
for (i = 0; elements[i] != NULL; i++) {