summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-03 15:16:01 +0200
committerMichael Adam <obnox@samba.org>2008-04-03 15:43:04 +0200
commit24c54ee4fbe8d093d3f4d729ef2b055b82798f9a (patch)
tree32e2e0653ca9fe9160811d36649ab6776d115db7 /source3/lib
parentdc2274819ea8888c6cdcdebaff56e43c3b09ba71 (diff)
downloadsamba-24c54ee4fbe8d093d3f4d729ef2b055b82798f9a.tar.gz
samba-24c54ee4fbe8d093d3f4d729ef2b055b82798f9a.tar.bz2
samba-24c54ee4fbe8d093d3f4d729ef2b055b82798f9a.zip
libsmbconf: move initialization of registry value down after error checks.
Michael (This used to be commit 2a8029985f9bde4da8ca20bc24d937150eab444c)
Diffstat (limited to 'source3/lib')
-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 "