[pacman-dev] [PATCH] files_search: free compiled regex

Andrew Gregory andrew.gregory.8 at gmail.com
Mon Nov 2 01:41:58 UTC 2015


Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 src/pacman/files.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/pacman/files.c b/src/pacman/files.c
index ef48f96..c2231cd 100644
--- a/src/pacman/files.c
+++ b/src/pacman/files.c
@@ -141,6 +141,9 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
 			}
 		}
 
+		if(regex) {
+			regfree(&reg);
+		}
 
 notfound:
 		if(!found) {
-- 
2.6.2


More information about the pacman-dev mailing list