summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-03-23 21:16:31 +0100
committerDan McGee <dan@archlinux.org>2008-03-23 22:55:03 +0100
commit7995a25d0ed75968df72fcf65d231508417ec060 (patch)
treea667351d1cf39d851c35af71db3e035347b997f9
parent7d451b6e6bc3926589a77e6a2d191e4f158d3980 (diff)
downloadpacman-7995a25d0ed75968df72fcf65d231508417ec060.tar.gz
pacman-7995a25d0ed75968df72fcf65d231508417ec060.tar.xz
strsplit(): memleak fix
We dup-ed the string but then duped it again. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index aa08eb26..0facfdd1 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -384,7 +384,7 @@ alpm_list_t *strsplit(const char *str, const char splitchar)
if(dup == NULL) {
return(NULL);
}
- list = alpm_list_add(list, strdup(prev));
+ list = alpm_list_add(list, dup);
return(list);
}