summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_conf.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-25 03:29:05 +0100
committerMichael Adam <obnox@samba.org>2007-12-25 03:29:05 +0100
commitf3b0469b4a623c3ef17e2453bf40eb52778b5c42 (patch)
treed3005611d79c662cf2f39504f324f1bf598c1736 /source3/libnet/libnet_conf.c
parenta66a5fd94bfb8a41bdb46aedf7eba28b55fbdaaf (diff)
downloadsamba-f3b0469b4a623c3ef17e2453bf40eb52778b5c42.tar.gz
samba-f3b0469b4a623c3ef17e2453bf40eb52778b5c42.tar.bz2
samba-f3b0469b4a623c3ef17e2453bf40eb52778b5c42.zip
Remove talloc context parameter from libnet_smbconf_setparm().
Make use of talloc stackframe internally. This removes talloc contxt from net_conf_setparm. Michael (This used to be commit efaffefc438f8375a083b194ac7a09e563000d3c)
Diffstat (limited to 'source3/libnet/libnet_conf.c')
-rw-r--r--source3/libnet/libnet_conf.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index be9edad4e9..6ea97a82eb 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -310,13 +310,13 @@ done:
return werr;
}
-WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
- const char *service,
+WERROR libnet_smbconf_setparm(const char *service,
const char *param,
const char *valstr)
{
WERROR werr;
struct registry_key *key = NULL;
+ TALLOC_CTX *mem_ctx = talloc_stackframe();
if (!libnet_smbconf_key_exists(service)) {
werr = libnet_smbconf_reg_createkey_internal(mem_ctx, service,
@@ -332,7 +332,7 @@ WERROR libnet_smbconf_setparm(TALLOC_CTX *mem_ctx,
werr = libnet_smbconf_reg_setvalue_internal(key, param, valstr);
done:
- TALLOC_FREE(key);
+ TALLOC_FREE(mem_ctx);
return werr;
}
@@ -401,10 +401,9 @@ done:
*
**********************************************************************/
-WERROR libnet_smbconf_set_global_param(TALLOC_CTX *mem_ctx,
- const char *param,
+WERROR libnet_smbconf_set_global_param(const char *param,
const char *val)
{
- return libnet_smbconf_setparm(mem_ctx, GLOBAL_NAME, param, val);
+ return libnet_smbconf_setparm(GLOBAL_NAME, param, val);
}