summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_conf.c6
-rw-r--r--source3/libnet/libnet_join.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index 6ea97a82eb..bb0e637b33 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -366,12 +366,12 @@ done:
return werr;
}
-WERROR libnet_smbconf_delparm(TALLOC_CTX *mem_ctx,
- const char *service,
+WERROR libnet_smbconf_delparm(const char *service,
const char *param)
{
struct registry_key *key = NULL;
WERROR werr = WERR_OK;
+ TALLOC_CTX *mem_ctx = talloc_stackframe();
if (!libnet_smbconf_key_exists(service)) {
return WERR_NO_SUCH_SERVICE;
@@ -390,7 +390,7 @@ WERROR libnet_smbconf_delparm(TALLOC_CTX *mem_ctx,
werr = reg_deletevalue(key, param);
done:
- TALLOC_FREE(key);
+ TALLOC_FREE(mem_ctx);
return werr;
}
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 4f5c09cf47..e8d114d747 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -381,7 +381,7 @@ static WERROR do_unjoin_modify_vals_config(TALLOC_CTX *mem_ctx,
W_ERROR_NOT_OK_RETURN(werr);
}
- werr = libnet_smbconf_delparm(mem_ctx, "GLOBAL", "realm");
+ werr = libnet_smbconf_delparm("GLOBAL", "realm");
return werr;
}