From 7995a25d0ed75968df72fcf65d231508417ec060 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 23 Mar 2008 15:16:31 -0500 Subject: strsplit(): memleak fix We dup-ed the string but then duped it again. Fix it. Signed-off-by: Dan McGee --- src/pacman/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3-70-g09d2