From 4c373d20131fecf09a3e8c053597f68d772b8d55 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 12 Dec 2010 19:23:53 +0100 Subject: s4:scripting/python/pyglue.c - add a OOM handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Sun Dec 12 20:50:55 CET 2010 on sn-devel-104 --- source4/scripting/python/pyglue.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4') diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 8a404a3b14..cbc81d3125 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -88,6 +88,10 @@ static PyObject *py_nttime2string(PyObject *self, PyObject *args) return NULL; tmp_ctx = talloc_new(NULL); + if (tmp_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } string = nt_time_string(tmp_ctx, nt); ret = PyString_FromString(string); -- cgit