xbps-pkgdb: fix two meamleaks in error paths.
xbps-rindex: fix memleaks in error paths.
lib/package_unpack.c: fix two possible memleaks.