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:
parent
7d451b6e6b
commit
7995a25d0e
1 changed files with 1 additions and 1 deletions
|
@ -384,7 +384,7 @@ alpm_list_t *strsplit(const char *str, const char splitchar)
|
||||||
if(dup == NULL) {
|
if(dup == NULL) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
list = alpm_list_add(list, strdup(prev));
|
list = alpm_list_add(list, dup);
|
||||||
|
|
||||||
return(list);
|
return(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue