summaryrefslogtreecommitdiffstats
path: root/cmd-source-file.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-22 13:48:29 +0000
committernicm <nicm>2021-08-22 13:48:29 +0000
commit72d905f32c53ea1304b4b3206383502a23cfc0fd (patch)
tree3604fd660df026d9bafc253115bd3b56fc8ab94a /cmd-source-file.c
parentc0048d6d20a056464a6b1b63e8bdc1793a29b029 (diff)
Do not double free expanded path in source-file, also remove some
unnecessary assignments.
Diffstat (limited to 'cmd-source-file.c')
-rw-r--r--cmd-source-file.c2
1 files changed, 1 insertions, 1 deletions
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;