~patrickb/Devel-ExecRunnerGenerator

4d5f769400dcceb1bd4fec305aad39155db8c7ad — Patrick Böker 6 months ago e28b009
Fix a misplaced `free` that freed `program` before the last use
1 files changed, 1 insertions(+), 1 deletions(-)

M runner-src/runner.c
M runner-src/runner.c => runner-src/runner.c +1 -1
@@ 369,7 369,6 @@ int main(int argc, char *argv[]) {
    size_t arg_size = argvQuote(program, NULL);
    wchar_t *program_encoded = calloc(arg_size, sizeof(wchar_t));
    argvQuote(program, program_encoded);
    free(program);
    
    // Put command line string together
    // Size of the final command line string:


@@ 387,6 386,7 @@ int main(int argc, char *argv[]) {
        cmd_line_size += arg_size;
        cmd_line[cmd_line_size - 1] = L' ';
    }
    free(program);
    free(exec_argv);
    cmd_line[cmd_line_size - 1] = 0;