[pacman-dev] [PATCH] pacman/files.c: fix memory leak on regex error
20 Jul
2015
20 Jul
'15
3:42 a.m.
Signed-off-by: Allan McRae <allan@archlinux.org> --- src/pacman/files.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pacman/files.c b/src/pacman/files.c index 2250994..ceec342 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -102,6 +102,7 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) { if(regex) { if(regcomp(®, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) { /* TODO: error message */ + free(targ); goto notfound; } } -- 2.4.6
3442
Age (days ago)
3442
Last active (days ago)
0 comments
1 participants
participants (1)
-
Allan McRae