lib/package_unpack.c: fix a memleak.

This commit is contained in:
Juan RP 2013-03-09 11:07:14 +01:00
parent 5885543728
commit e2b303363b

View File

@ -256,8 +256,7 @@ unpack_archive(struct xbps_handle *xhp,
*/
if (entry_idx >= 3) {
xbps_set_cb_state(xhp,
XBPS_STATE_UNPACK_FAIL,
ENODEV, pkgver,
XBPS_STATE_UNPACK_FAIL, ENODEV, pkgver,
"%s: [unpack] invalid binary package `%s'.",
pkgver, fname);
rv = ENODEV;
@ -380,6 +379,7 @@ unpack_archive(struct xbps_handle *xhp,
skip_extract = true;
}
free(buf);
free(p2);
}
}
/*