]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Kai Jourdan spotted a rather embarrassing double-free, and Minefield
authorSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2007 14:06:08 +0000 (14:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 26 Jan 2007 14:06:08 +0000 (14:06 +0000)
confirms that it's a real problem.

[originally from svn r7168]

windows/window.c

index dca27a4406b325d4f5b3e9781a97847dfe0df167..477e6333dbc0e0cf816172e735fa7b2865f3bb62 100644 (file)
@@ -816,9 +816,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
            sfree(handles);
            if (must_close_session)
                close_session();
-       }
-
-       sfree(handles);
+       } else
+           sfree(handles);
 
        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
            if (msg.message == WM_QUIT)