Commit 90db2ada authored by Federico G. Schwindt's avatar Federico G. Schwindt

Plug harmless leak

parent 5005595f
...@@ -460,7 +460,7 @@ exec_file(const char *fn, const char *script, const char *tmpdir, ...@@ -460,7 +460,7 @@ exec_file(const char *fn, const char *script, const char *tmpdir,
{ {
FILE *f; FILE *f;
struct vsb *vsb; struct vsb *vsb;
const char *p; char *p;
(void)signal(SIGPIPE, SIG_IGN); (void)signal(SIGPIPE, SIG_IGN);
...@@ -474,8 +474,12 @@ exec_file(const char *fn, const char *script, const char *tmpdir, ...@@ -474,8 +474,12 @@ exec_file(const char *fn, const char *script, const char *tmpdir,
vsb = VSB_new_auto(); vsb = VSB_new_auto();
AN(vsb); AN(vsb);
if (*fn != '/') if (*fn != '/') {
VSB_cat(vsb, macro_get("pwd", NULL)); p = macro_get("pwd", NULL);
AN(p);
VSB_cat(vsb, p);
free(p);
}
p = strrchr(fn, '/'); p = strrchr(fn, '/');
if (p != NULL) { if (p != NULL) {
VSB_putc(vsb, '/'); VSB_putc(vsb, '/');
......
Markdown is supported
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