summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/ldb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index a27c94e4a9..0213c54a53 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -369,7 +369,11 @@ static WERROR ldb_get_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
int ret;
char *query;
- if ((name == NULL) || (name[0] == '\0')) {
+ if (name == NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
+ if (name[0] == '\0') {
/* default value */
return ldb_get_default_value(mem_ctx, k, NULL, data_type, data);
} else {