diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-21 10:32:24 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-03-22 19:52:57 +0100 |
commit | 3940777a14a93dbf88fcc9e43452fc2f84a7b6fc (patch) | |
tree | 095b34cf3ba9914876bc8e72f8d5f23f3c9b7ba8 /source4/auth | |
parent | 5d09acab7e5e671f244d69f59d1714a16bdb93fb (diff) | |
download | samba-3940777a14a93dbf88fcc9e43452fc2f84a7b6fc.tar.gz samba-3940777a14a93dbf88fcc9e43452fc2f84a7b6fc.tar.bz2 samba-3940777a14a93dbf88fcc9e43452fc2f84a7b6fc.zip |
s4:python bindings - handle NULL returns from "loadparm_init_global"
Reviewed-by: Jelmer
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Mar 22 19:52:57 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/gensec/pygensec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c index cd05bd7ccf..5fe3703138 100644 --- a/source4/auth/gensec/pygensec.c +++ b/source4/auth/gensec/pygensec.c @@ -113,6 +113,11 @@ static PyObject *py_gensec_start_client(PyTypeObject *type, PyObject *args, PyOb } settings->lp_ctx = loadparm_init_global(true); + if (settings->lp_ctx == NULL) { + PyErr_NoMemory(); + PyObject_DEL(self); + return NULL; + } } ev = tevent_context_init(self->talloc_ctx); @@ -181,6 +186,11 @@ static PyObject *py_gensec_start_server(PyTypeObject *type, PyObject *args, PyOb } settings->lp_ctx = loadparm_init_global(true); + if (settings->lp_ctx == NULL) { + PyErr_NoMemory(); + PyObject_DEL(self); + return NULL; + } } ev = tevent_context_init(self->talloc_ctx); |