pyauth: Check return value of lpcfg_from_py_object().
authorAndreas Schneider <asn@samba.org>
Tue, 19 Feb 2013 07:58:00 +0000 (08:58 +0100)
committerAlexander Bokovoy <ab@samba.org>
Fri, 22 Feb 2013 15:36:13 +0000 (16:36 +0100)
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source4/auth/pyauth.c

index f07fa786a1791e4a700c087c23275331a44da951..437e671bba280e7c0966533361481fb1574a76c7 100644 (file)
@@ -245,6 +245,10 @@ static PyObject *py_auth_context_new(PyTypeObject *type, PyObject *args, PyObjec
        }
 
        lp_ctx = lpcfg_from_py_object(mem_ctx, py_lp_ctx);
+       if (lp_ctx == NULL) {
+               PyErr_NoMemory();
+               return NULL;
+       }
 
        ev = s4_event_context_init(mem_ctx);
        if (ev == NULL) {