summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_conf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index ebf2d6654f..4945413bb1 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -258,10 +258,14 @@ WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
werr = libnet_smbconf_open_path(mem_ctx, service, REG_KEY_WRITE,
&key);
}
- W_ERROR_NOT_OK_RETURN(werr);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
werr = libnet_smbconf_reg_setvalue_internal(key, param, valstr);
+done:
+ TALLOC_FREE(key);
return werr;
}