diff options
-rw-r--r-- | source4/scripting/ejs/ejsnet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/ejs/ejsnet.c b/source4/scripting/ejs/ejsnet.c index 5daf478506..8662ae2caf 100644 --- a/source4/scripting/ejs/ejsnet.c +++ b/source4/scripting/ejs/ejsnet.c @@ -367,11 +367,15 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv) status = libnet_UserInfo(ctx, mem_ctx, &req); if (!NT_STATUS_IS_OK(status)) { ejsSetErrorMsg(eid, "%s", req.out.error_string); + + /* create null object to return */ + mprUserInfo = mprCreateNullVar(); + goto done; } /* create UserInfo object */ mprUserInfo = mprObject("UserInfo"); - + mprAccountName = mprString(req.out.account_name); mprFullName = mprString(req.out.full_name); mprDescription = mprString(req.out.description); |