I just put a patch up in phabricator (D26521) which avoids always
malloc()'ng a large MAX_NGROUPS sized groups list by having a
small one in the structure and then only malloc()'ng when a large
groups list is needed.
I've listed kib@ and freqlabs@ as reviewers, but anyone else is
welcome to review it.
The review is probably about the technique I used.
(Alternately, the could just always malloc() the groups array the
correct size instead of using the SMALLNGROUPS one or malloc()'ng.)