summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/py_xattr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/librpc/ndr/py_xattr.c b/source4/librpc/ndr/py_xattr.c
index 15f2b9c33a..9cf87e24a9 100644
--- a/source4/librpc/ndr/py_xattr.c
+++ b/source4/librpc/ndr/py_xattr.c
@@ -22,6 +22,7 @@
#ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
+
static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods)
{
PyObject *dict;
@@ -69,7 +70,11 @@ static PyObject *py_ntacl_print(PyObject *self, PyObject *args)
mem_ctx = talloc_new(NULL);
pr = talloc_zero(mem_ctx, struct ndr_print);
- if (!pr) return;
+ if (!pr) {
+ PyErr_NoMemory();
+ talloc_free(mem_ctx);
+ return NULL;
+ }
pr->print = ntacl_print_debug_helper;
ndr_print_xattr_NTACL(pr, "file", ntacl);