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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue