lib/package_unpack.c: fix a memleak.
This commit is contained in:
parent
5885543728
commit
e2b303363b
@ -256,8 +256,7 @@ unpack_archive(struct xbps_handle *xhp,
|
|||||||
*/
|
*/
|
||||||
if (entry_idx >= 3) {
|
if (entry_idx >= 3) {
|
||||||
xbps_set_cb_state(xhp,
|
xbps_set_cb_state(xhp,
|
||||||
XBPS_STATE_UNPACK_FAIL,
|
XBPS_STATE_UNPACK_FAIL, ENODEV, pkgver,
|
||||||
ENODEV, pkgver,
|
|
||||||
"%s: [unpack] invalid binary package `%s'.",
|
"%s: [unpack] invalid binary package `%s'.",
|
||||||
pkgver, fname);
|
pkgver, fname);
|
||||||
rv = ENODEV;
|
rv = ENODEV;
|
||||||
@ -380,6 +379,7 @@ unpack_archive(struct xbps_handle *xhp,
|
|||||||
skip_extract = true;
|
skip_extract = true;
|
||||||
}
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
|
free(p2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user