summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/pyglue.c4
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);