lib/package_unpack.c: fix a meamleak in error path.
This commit is contained in:
parent
e844bc1ad5
commit
0a1ea51e4e
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user