summaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-07-26 11:02:26 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-08-01 12:18:34 -0400
commitf1453927ec63580e9d74279b71e3c6d4abe346e5 (patch)
tree39eb6ebc956f20700937911428b7e084f946587c /src/python
parentd5278883effef0c96f3fd3032da1335fdf1613d7 (diff)
downloadsssd-f1453927ec63580e9d74279b71e3c6d4abe346e5.tar.gz
sssd-f1453927ec63580e9d74279b71e3c6d4abe346e5.tar.xz
sssd-f1453927ec63580e9d74279b71e3c6d4abe346e5.zip
Handle allocation error in python HBAC bindings
https://fedorahosted.org/sssd/ticket/934
Diffstat (limited to 'src/python')
-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 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);