From 1647e17684a07b29501b4a2ef4bfdd59e989f390 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 May 2011 14:34:41 -0600 Subject: [PATCH] Fix two zero byte files being left behind after calibre quits on windows --- setup/installer/windows/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/installer/windows/main.c b/setup/installer/windows/main.c index d76850504e..780be94330 100644 --- a/setup/installer/windows/main.c +++ b/setup/installer/windows/main.c @@ -23,6 +23,9 @@ wWinMain(HINSTANCE Inst, HINSTANCE PrevInst, ret = execute_python_entrypoint(BASENAME, MODULE, FUNCTION, stdout_redirect, stderr_redirect); + if (stdout != NULL) fclose(stdout); + if (stderr != NULL) fclose(stderr); + DeleteFile(stdout_redirect); DeleteFile(stderr_redirect);