From 3cc8929ce12ae52aa5faffec77c107e32cd03a29 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 19 Aug 2014 10:45:46 +0200 Subject: [PATCH] xbps_get_pkg_plist_from_binpkg: fix a double free, found by Gottox. xbps-query -Rf foo without network was enough to trigger it. --- NEWS | 3 +++ lib/plist_fetch.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index bd3722af..f19d9b8a 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ xbps-0.38 (???): + * xbps-query(8): fix a segfault with -Rf when there's no network connectivity. + Reported by Gottox. + * xbps-uchroot(8): do not remount / unnecessarily; just mount it as private and nosuid once; this is enough for our use cases. diff --git a/lib/plist_fetch.c b/lib/plist_fetch.c index 08d24e91..519fc22e 100644 --- a/lib/plist_fetch.c +++ b/lib/plist_fetch.c @@ -101,7 +101,6 @@ open_archive_by_url(struct url *url) if (archive_read_open(a, f, fetch_archive_open, fetch_archive_read, fetch_archive_close)) { - free(f); archive_read_finish(a); return NULL; }