lib/archive.c: fixed memleaks in error paths; misc cleanups.
lib/archive.c: fixed memleaks in error paths; misc cleanups.

stpx/xbps,ebfe/xbps,datenwolf/xbps,datenwolf/xbps,stpx/xbps,datenwolf/xbps,ebfe/xbps,ebfe/xbps,stpx/xbps