From e2b303363b72ca8d51e32a1f0d6dfec0be63e0fb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 9 Mar 2013 11:07:14 +0100 Subject: [PATCH] lib/package_unpack.c: fix a memleak. --- lib/package_unpack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/package_unpack.c b/lib/package_unpack.c index e27e9e48..2e9c2194 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -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); } } /*