From 72d905f32c53ea1304b4b3206383502a23cfc0fd Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 22 Aug 2021 13:48:29 +0000 Subject: Do not double free expanded path in source-file, also remove some unnecessary assignments. --- cmd-source-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-source-file.c') diff --git a/cmd-source-file.c b/cmd-source-file.c index 63e1b28c..fbe871ca 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -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; -- cgit