Ensure regex object is always initialized
This avoids a crash in filetarget_free() when regex support isn't requested in files_search().
This commit is contained in:
parent
56e0763c6d
commit
ffb69c700a
1 changed files with 1 additions and 1 deletions
|
@ -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] == '/') {
|
||||
|
|
Loading…
Add table
Reference in a new issue