summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/smbconf/smbconf_reg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index 77e6233cb4..b40c37e60e 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -220,12 +220,6 @@ static WERROR smbconf_reg_set_value(struct registry_key *key,
goto done;
}
- ZERO_STRUCT(val);
-
- val.type = REG_SZ;
- val.v.sz.str = CONST_DISCARD(char *, canon_valstr);
- val.v.sz.len = strlen(canon_valstr) + 1;
-
if (registry_smbconf_valname_forbidden(canon_valname)) {
DEBUG(5, ("Parameter '%s' not allowed in registry.\n",
canon_valname));
@@ -251,6 +245,12 @@ static WERROR smbconf_reg_set_value(struct registry_key *key,
goto done;
}
+ ZERO_STRUCT(val);
+
+ val.type = REG_SZ;
+ val.v.sz.str = CONST_DISCARD(char *, canon_valstr);
+ val.v.sz.len = strlen(canon_valstr) + 1;
+
werr = reg_setvalue(key, canon_valname, &val);
if (!W_ERROR_IS_OK(werr)) {
DEBUG(5, ("Error adding value '%s' to "