summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_creds.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-06 12:24:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:47 -0500
commit8574fe2f8e07f15f129a7b53773c5a83278a9499 (patch)
tree8361dc05b93dbbe0b71b863e379690e7ed686f76 /source4/scripting/ejs/smbcalls_creds.c
parentde296b65136c3d7b6170db099b626d94fa190306 (diff)
downloadsamba-8574fe2f8e07f15f129a7b53773c5a83278a9499.tar.gz
samba-8574fe2f8e07f15f129a7b53773c5a83278a9499.tar.bz2
samba-8574fe2f8e07f15f129a7b53773c5a83278a9499.zip
r12738: Use a talloc_reference to ensure this doesn't get free()'ed too early.
Andrew Bartlett (This used to be commit 0f8c162211662de59f42a96fe5bdf56ed5be883f)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_creds.c')
-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);
}