From 726712aa08bb9699b5cea71a4a7a997551e9d7c8 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sun, 1 Nov 2015 13:56:06 -0500 Subject: files_search: free compiled regex Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- src/pacman/files.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/pacman/files.c b/src/pacman/files.c index 3bb2f2ba..5baf5e57 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -169,6 +169,9 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) { } } + if(regex) { + regfree(®); + } notfound: if(!found) { -- cgit v1.2.3-24-g4f1b