Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2021-01-15 23:20:56 -0800
committerAllan McRae <allan@archlinux.org>2021-01-19 12:37:24 +1000
commit5d21b2d44c1727e33bd7c71e657501eb013c44d0 (patch)
treeb533c12b3ebf8891edaaed057ced40a9bf233017
parent4311cc3648df4d695b4c69b048137f87cb5dd89a (diff)
pacman-conf: free rootdir before replacing
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/pacman-conf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index 463badf1..05492ed9 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -76,6 +76,7 @@ static void parse_opts(int argc, char **argv)
config_file = optarg;
break;
case 'R':
+ free(config->rootdir);
if ((config->rootdir = strdup(optarg)) == NULL) {
fprintf(stderr, _("error setting rootdir '%s': out of memory\n"), optarg);
cleanup();