summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-07-20 13:41:36 +1000
committerAllan McRae <allan@archlinux.org>2015-07-20 13:41:36 +1000
commit8566034866615f1acee6f3ed447ca88f01105b2e (patch)
tree23f7c48a92887929c0840ef84082cbfc2092e165 /src/pacman
parentdeac9731884a83ad91eab9f27b288f406f56c87b (diff)
pacman/files.c: fix memory leak on regex error
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/files.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c
index 22509943..ceec3429 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(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
/* TODO: error message */
+ free(targ);
goto notfound;
}
}