From 3a5d6b1376e618c0109adfbdcc144fdcbfd03975 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 17 Apr 2013 14:20:48 +0200 Subject: [PATCH] xbps-rindex: fixed writing repo index-files (regression added in e29f221). --- bin/xbps-rindex/index-add.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index 9de44420..138f234c 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -68,7 +68,6 @@ index_add(struct xbps_handle *xhp, int argc, char **argv) free(tmprepodir); return -1; } - free(tmprepodir); if ((idx = prop_dictionary_internalize_from_zfile(plist)) == NULL) { if (errno != ENOENT) { @@ -84,6 +83,8 @@ index_add(struct xbps_handle *xhp, int argc, char **argv) if ((plistf = xbps_pkg_index_files_plist(xhp, repodir)) == NULL) return -1; + free(tmprepodir); + if ((idxfiles = prop_dictionary_internalize_from_zfile(plistf)) == NULL) { if (errno != ENOENT) { fprintf(stderr, "index: cannot read `%s': %s\n",