summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/reg_backend_ldb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/registry/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb.c
index 114614597f..3c50258d02 100644
--- a/source4/lib/registry/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb.c
@@ -125,10 +125,11 @@ static char *reg_path_to_ldb(TALLOC_CTX *mem_ctx, struct registry_key *from, con
while(mypath) {
char *keyname;
- begin = strrchr(mypath, '\\');
struct ldb_val val;
char *key;
+ begin = strrchr(mypath, '\\');
+
if (begin) keyname = begin + 1;
else keyname = mypath;