mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
pacman/files.c: fix memory leak on regex error
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
deac973188
commit
8566034866
@ -102,6 +102,7 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
|
|||||||
if(regex) {
|
if(regex) {
|
||||||
if(regcomp(®, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
|
if(regcomp(®, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
|
||||||
/* TODO: error message */
|
/* TODO: error message */
|
||||||
|
free(targ);
|
||||||
goto notfound;
|
goto notfound;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user