summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/python/pyhbac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/pyhbac.c b/src/python/pyhbac.c
index 2ff21b93..38df27e5 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);