libpciaccess: fix memory usage errors

This patch fixes memory usage errors that only occur on large SPARC
machines with more than 256 PCI devices. In this case, memory is being
used after it has been freed by calls to both free() and realloc().
This error was introduced by a previous patch:
2011-03-30 Solaris support for multiple PCI segments (domains)

Signed-off-by: Mark Logan <mark.logan@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2 files changed