Since the 2.6 kernel for Linux/Sparc64 seems to have issues with select(), I've converted it to poll(). The attached patch makes the core changes, but you probably will want to wrap it with an autoconf check, since poll() is not the most portable thing known to mankind. :)
Created attachment 100635 [details] use poll() instead of select() in rpmio.c
Hmmm, several problems with your patch, not just the memory leak. Anyways, poll(2) now used instead of select(2) if available. Patch checked in on HEAD and rpm-4_3 branch.