diff options
author | Dave Reisner <dreisner@archlinux.org> | 2019-12-24 13:40:53 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-01-07 02:40:32 +0100 |
commit | ffb69c700abd6eb3b86e79e09b135029ff9104b4 (patch) | |
tree | 7a73d007b7d5849fbc3f7b791e68bf7b90f8e8a5 /src | |
parent | 56e0763c6d1d248b986ac22836de5ede0a805cfb (diff) | |
download | pacman-ffb69c700abd6eb3b86e79e09b135029ff9104b4.tar.gz pacman-ffb69c700abd6eb3b86e79e09b135029ff9104b4.tar.xz |
Ensure regex object is always initialized
This avoids a crash in filetarget_free() when regex support isn't
requested in files_search().
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c index 7b0c884b..cae7130d 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -114,7 +114,7 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) { char *targ = t->data; size_t len = strlen(targ); int exact_file = strchr(targ, '/') != NULL; - regex_t reg; + regex_t reg = {0}; if(exact_file) { while(len > 1 && targ[0] == '/') { |