summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 1fb447c6..748bc546 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -443,9 +443,11 @@ static int parsearg_global(int opt)
config->noprogressbar = 1;
break;
case OP_GPGDIR:
+ free(config->gpgdir);
config->gpgdir = strdup(optarg);
break;
case OP_LOGFILE:
+ free(config->logfile);
config->logfile = strndup(optarg, PATH_MAX);
break;
case OP_NOCONFIRM:
@@ -453,10 +455,12 @@ static int parsearg_global(int opt)
break;
case OP_DBPATH:
case 'b':
+ free(config->dbpath);
config->dbpath = strdup(optarg);
break;
case OP_ROOT:
case 'r':
+ free(config->rootdir);
config->rootdir = strdup(optarg);
break;
case OP_VERBOSE:
@@ -623,6 +627,7 @@ static int parsearg_trans(int opt)
break;
case OP_PRINTFORMAT:
config->print = 1;
+ free(config->print_format);
config->print_format = strdup(optarg);
break;
default: