1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-11 20:05:07 -05:00

pacman/files.c: fix memory leak on regex error

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2015-07-20 13:41:36 +10:00
parent deac973188
commit 8566034866

View File

@ -102,6 +102,7 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
if(regex) {
if(regcomp(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
/* TODO: error message */
free(targ);
goto notfound;
}
}