Skip to content

Commit

Permalink
Every time release allocated memory in function py_sss_getgrouplist
Browse files Browse the repository at this point in the history
Coverity: 11922
  • Loading branch information
Lukas Slebodnik authored and jhrozek committed Jul 24, 2013
1 parent 867174c commit 50134a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python/pysss.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ static PyObject *py_sss_getgrouplist(PyObject *self, PyObject *args)
idx++;
}
}
free(groups);
groups = NULL;

if (i != idx) {
_PyTuple_Resize(&groups_tuple, idx);
Expand Down

0 comments on commit 50134a8

Please sign in to comment.