Commit ffb69c70 authored by Dave Reisner's avatar Dave Reisner Committed by Allan McRae
Browse files

Ensure regex object is always initialized

This avoids a crash in filetarget_free() when regex support isn't
requested in files_search().
parent 56e0763c
......@@ -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] == '/') {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment