diff options
Diffstat (limited to 'source4/auth/credentials')
-rw-r--r-- | source4/auth/credentials/pycredentials.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index de5cc87194..3b11955538 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -38,7 +38,13 @@ static PyObject *PyString_FromStringOrNULL(const char *str) static PyObject *py_creds_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { - return py_talloc_import(type, cli_credentials_init(NULL)); + py_talloc_Object *ret = (py_talloc_Object *)PyCredentials.tp_alloc(&PyCredentials, 0); + ret->talloc_ctx = talloc_new(NULL); + if (ret->talloc_ctx == NULL) { + return NULL; + } + ret->ptr = cli_credentials_init(ret->talloc_ctx); + return (PyObject *)ret; } static PyObject *py_creds_get_username(py_talloc_Object *self) |