summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-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 2afb65c7d59..6079efd6543 100644
--- a/source4/lib/registry/local.c
+++ b/source4/lib/registry/local.c
@@ -389,7 +389,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 && str_list_length(elements) != 0) {
+ if (elements != NULL && elements[0] != NULL) {
mp->path.elements = talloc_array(mp, const char *,
str_list_length(elements));
W_ERROR_HAVE_NO_MEMORY(mp->path.elements);