pacman.c: Remove redundant strdup() in parsearg_global()
config_set_arch() already calls strdup(). Remove strdup() from the config_set_arch() invocation to avoid a memory leak. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
87fb8f5d57
commit
a2002b8f69
1 changed files with 1 additions and 1 deletions
|
@ -385,7 +385,7 @@ static int parsearg_global(int opt)
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case OP_ARCH:
|
case OP_ARCH:
|
||||||
check_optarg();
|
check_optarg();
|
||||||
config_set_arch(strdup(optarg));
|
config_set_arch(optarg);
|
||||||
break;
|
break;
|
||||||
case OP_ASK:
|
case OP_ASK:
|
||||||
check_optarg();
|
check_optarg();
|
||||||
|
|
Loading…
Add table
Reference in a new issue