summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-12-14 22:12:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:17 -0500
commit765256d435cdee92d69e1fe8dad591e68bcb08b7 (patch)
tree518cb128e4748ccc33a7e0f4460b91dd5fd88680 /source4/scripting/ejs
parente55ff42229d67c1447f2c811191b79137b1ce8cc (diff)
downloadsamba-765256d435cdee92d69e1fe8dad591e68bcb08b7.tar.gz
samba-765256d435cdee92d69e1fe8dad591e68bcb08b7.tar.bz2
samba-765256d435cdee92d69e1fe8dad591e68bcb08b7.zip
r20175: use libnet context instead mem_ctx as the latter gets
freed just before the function returns. rafal (This used to be commit ca8259fd27d1e92bcb650441461afdfd613e93bf)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/ejsnet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/scripting/ejs/ejsnet.c b/source4/scripting/ejs/ejsnet.c
index 8662ae2caf..41ea1e2327 100644
--- a/source4/scripting/ejs/ejsnet.c
+++ b/source4/scripting/ejs/ejsnet.c
@@ -375,7 +375,7 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
/* create UserInfo object */
mprUserInfo = mprObject("UserInfo");
-
+
mprAccountName = mprString(req.out.account_name);
mprFullName = mprString(req.out.full_name);
mprDescription = mprString(req.out.description);
@@ -384,8 +384,8 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
mprComment = mprString(req.out.comment);
mprLogonScript = mprString(req.out.logon_script);
mprAcctExpiry = mprString(timestring(mem_ctx, req.out.acct_expiry->tv_sec));
- mprAllowPassChange = mprString(timestring(mem_ctx, req.out.allow_password_change->tv_sec));
- mprForcePassChange = mprString(timestring(mem_ctx, req.out.force_password_change->tv_sec));
+ mprAllowPassChange = mprString(timestring(ctx, req.out.allow_password_change->tv_sec));
+ mprForcePassChange = mprString(timestring(ctx, req.out.force_password_change->tv_sec));
status = mprSetVar(&mprUserInfo, "AccountName", mprAccountName);
if (!NT_STATUS_IS_OK(status)) goto done;
@@ -407,7 +407,6 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
if (!NT_STATUS_IS_OK(status)) goto done;
status = mprSetVar(&mprUserInfo, "ForcePasswordChange", mprForcePassChange);
if (!NT_STATUS_IS_OK(status)) goto done;
-
done:
talloc_free(mem_ctx);
mpr_Return(eid, mprUserInfo);