This is the final draft proposed patch
https://fedorahosted.org/389/attachment/ticket/47504/0001-Ticket-47504-id...
Here are the diffs since the last patch:
https://fedorahosted.org/389/attachment/ticket/47504/newdiffs
The biggest change is to use DataList instead of a linked list for the
idlistscanlimit info structures.
Testing with valgrind revealed a couple of memory leaks which have been
fixed.
Some formatting has been improved.
Error messages have been improved/fixed.