Do not double free expanded path in source-file, also remove some

unnecessary assignments.
This commit is contained in:
nicm
2021-08-22 13:48:29 +00:00
parent c0048d6d20
commit 72d905f32c
4 changed files with 4 additions and 6 deletions

View File

@ -180,12 +180,12 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item)
free(pattern);
continue;
}
free(expanded);
free(pattern);
for (j = 0; j < g.gl_pathc; j++)
cmd_source_file_add(cdata, g.gl_pathv[j]);
}
free(expanded);
cdata->after = item;
cdata->retval = retval;