Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-08-26 13:10:35 +0200
committerDan McGee <dan@archlinux.org>2011-08-28 19:37:16 -0500
commita2002b8f690e12a7e8c75a3a9184570d27709c71 (patch)
tree06c927cb535a6f1e4ce2f125337e5dc7d910fc0b /src
parent87fb8f5d5795be9b2bcb025eac26c94d7bb1e7b3 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 71413bdd..d285a055 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -385,7 +385,7 @@ static int parsearg_global(int opt)
switch(opt) {
case OP_ARCH:
check_optarg();
- config_set_arch(strdup(optarg));
+ config_set_arch(optarg);
break;
case OP_ASK:
check_optarg();