summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/ejs/smbcalls_creds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/scripting/ejs/smbcalls_creds.c b/source4/scripting/ejs/smbcalls_creds.c
index 3cd554b957..bec70bc6f2 100644
--- a/source4/scripting/ejs/smbcalls_creds.c
+++ b/source4/scripting/ejs/smbcalls_creds.c
@@ -237,6 +237,9 @@ static int ejs_credentials_init(MprVarHandle eid, int argc, struct MprVar **argv
int ejs_credentials_cmdline(int eid, int argc, struct MprVar **argv)
{
struct MprVar *obj = mprInitObject(eid, "credentials", argc, argv);
+ if (talloc_reference(mprMemCtx(), cmdline_credentials) == NULL) {
+ return -1;
+ }
return ejs_credentials_obj(obj, cmdline_credentials);
}