1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

strsplit(): memleak fix

We dup-ed the string but then duped it again. Fix it.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-03-23 15:16:31 -05:00
parent 7d451b6e6b
commit 7995a25d0e

View File

@ -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);
}