r20175: use libnet context instead mem_ctx as the latter gets
authorRafal Szczesniak <mimir@samba.org>
Thu, 14 Dec 2006 22:12:53 +0000 (22:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:29:17 +0000 (14:29 -0500)
freed just before the function returns.

rafal
(This used to be commit ca8259fd27d1e92bcb650441461afdfd613e93bf)

source4/scripting/ejs/ejsnet.c

index 8662ae2caf99d83b0582c86ac37299d705d9b5b0..41ea1e232720f9f27f5a32b7562cdd0ed931797f 100644 (file)
@@ -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);