summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-07-26 11:02:26 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-07-27 16:43:35 -0400
commitd6354aa46716751a41ddab86bc64c1c7c218c5cc (patch)
tree8af84a785ed99612cc1deed5e7746409336e8d4f /src
parent778d3b4ec69c0a8a59d3d23ebbf1e65a4ea286ef (diff)
downloadsssd-d6354aa46716751a41ddab86bc64c1c7c218c5cc.tar.gz
sssd-d6354aa46716751a41ddab86bc64c1c7c218c5cc.tar.bz2
sssd-d6354aa46716751a41ddab86bc64c1c7c218c5cc.zip
Handle allocation error in python HBAC bindings
https://fedorahosted.org/sssd/ticket/934
Diffstat (limited to 'src')
-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);