diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-12 19:23:53 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-12-12 20:50:55 +0100 |
commit | 4c373d20131fecf09a3e8c053597f68d772b8d55 (patch) | |
tree | eea3da0bb113359794e6be010070da5fe8f83312 /source4/scripting/python | |
parent | 13da83be60ef79d1ba75455f9b96f7dfb80bd43a (diff) | |
download | samba-4c373d20131fecf09a3e8c053597f68d772b8d55.tar.gz samba-4c373d20131fecf09a3e8c053597f68d772b8d55.tar.bz2 samba-4c373d20131fecf09a3e8c053597f68d772b8d55.zip |
s4:scripting/python/pyglue.c - add a OOM handling
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 20:50:55 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/pyglue.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |