r12822: Given that talloc gives us this extra level of safety, use it.
[kai/samba.git] / source4 / scripting / ejs / smbcalls_ldb.c
index 39698947d7be59905fac8c53e7e6da27aa47d8e8..1a224605eecb0283cff143ad65955125e0252afa 100644 (file)
@@ -399,12 +399,12 @@ static int ejs_ldbConnect(MprVarHandle eid, int argc, char **argv)
 
        credentials = mprGetProperty(this, "credentials", NULL);
        if (credentials) {
-               creds = mprGetPtr(credentials, "creds");
+               creds = talloc_get_type(mprGetPtr(credentials, "creds"), struct cli_credentials);
        }
 
        session = mprGetProperty(this, "session_info", NULL);
        if (session) {
-               session_info = mprGetPtr(session, "session_info");
+               session_info = talloc_get_type(mprGetPtr(session, "session_info"), struct auth_session_info);
        }
 
        dbfile = argv[0];