]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Merge r9355 (Pageant handle leak fix).
authorSimon Tatham <anakin@pobox.com>
Mon, 28 Nov 2011 19:24:15 +0000 (19:24 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 28 Nov 2011 19:24:15 +0000 (19:24 +0000)
[originally from svn r9356]
[r9355 == 1682b42b87f441cf1e80ec72e82eecf1726eb99b]

windows/winpgnt.c

index eee99f504fb8fa2d253be4384ab666a9cf12ae58..c91695cf44f9453a10163592d97def20ea173d29 100644 (file)
@@ -1928,8 +1928,10 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
                     }
 #endif
                    if (!EqualSid(mapowner, ourself) &&
-                        !EqualSid(mapowner, ourself2))
+                        !EqualSid(mapowner, ourself2)) {
+                        CloseHandle(filemap);
                        return 0;      /* security ID mismatch! */
+                    }
 #ifdef DEBUG_IPC
                    debug(("security stuff matched\n"));
 #endif