lib/package_unpack.c: fix a meamleak in error path.

This commit is contained in:
Juan RP 2013-04-04 09:17:32 +02:00
parent e844bc1ad5
commit 0a1ea51e4e

View File

@ -258,6 +258,11 @@ unpack_archive(struct xbps_handle *xhp,
XBPS_STATE_UNPACK_FAIL, ENODEV, pkgver,
"%s: [unpack] invalid binary package `%s'.",
pkgver, fname);
if (instbuf != NULL)
free(instbuf);
if (rembuf != NULL)
free(rembuf);
rv = ENODEV;
goto out;
}