]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix memory and temporary file leak
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 25 Apr 2019 18:37:37 +0000 (20:37 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 25 Apr 2019 18:37:37 +0000 (20:37 +0200)
src/execute.c

index 7c7efb275a7e5dd374916f73c8d47bd989c2df6f..af95a343cee6d4f01653f5417d30c0cb0ec5dc5e 100644 (file)
@@ -182,6 +182,8 @@ win32execute(char *path, char **argv, int doreturn,
                snprintf(atfile, sizeof(atfile), "\"@%s\"", tmp_file);
                ret = CreateProcess(NULL, atfile, NULL, NULL, 1, 0, NULL, NULL,
                                    &si, &pi);
+               tmp_unlink(tmp_file);
+               free(tmp_file);
        }
        if (!ret) {
                ret = CreateProcess(full_path_win_ext, args, NULL, NULL, 1, 0, NULL, NULL,