[SSSD] [PATCH] Every time release allocated memory in function
Lukas Slebodnik
lslebodn at redhat.com
Wed Jul 24 10:06:41 UTC 2013
ehlo,
Memory leak was found by coverity. (and also by scan-build)
Patch is attached.
LS
-------------- next part --------------
>From 5b84e6f9114b623c01cb0bc50ae7405c6225c91f Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Wed, 24 Jul 2013 10:52:08 +0200
Subject: [PATCH] Every time release allocated memory in function
py_sss_getgrouplist
Coverity: 11922
---
src/python/pysss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/python/pysss.c b/src/python/pysss.c
index 4dd0351354aadb185a25f5c54e945f8397d7dcf7..284947be184054122b425b31e42615b1fa10b2e2 100644
--- a/src/python/pysss.c
+++ b/src/python/pysss.c
@@ -804,6 +804,7 @@ static PyObject *py_sss_getgrouplist(PyObject *self, PyObject *args)
idx++;
}
}
+ free(groups);
if (i != idx) {
_PyTuple_Resize(&groups_tuple, idx);
--
1.8.3.1
More information about the sssd-devel
mailing list