From f1453927ec63580e9d74279b71e3c6d4abe346e5 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 26 Jul 2011 11:02:26 +0200 Subject: Handle allocation error in python HBAC bindings https://fedorahosted.org/sssd/ticket/934 --- src/python/pyhbac.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/python/pyhbac.c b/src/python/pyhbac.c index 2ff21b934..38df27e50 100644 --- a/src/python/pyhbac.c +++ b/src/python/pyhbac.c @@ -1199,6 +1199,9 @@ HbacRequestElement_repr(HbacRequestElement *self) args = Py_BuildValue(sss_py_const_p(char, "Os"), self->name, strgroups); if (args == NULL) { + PyMem_Free(strgroups); + Py_DECREF(format); + return NULL; } o = PyUnicode_Format(format, args); -- cgit