From 302ea8c260fa8800ea1e494dd470028e6b00bac7 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 1 Jan 2006 18:38:59 +0000 Subject: [PATCH] Fix mapping "leak" in newly introduced win32_globallookup. --- crypto/dso/dso_win32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 73ffe36591..94fe473377 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -809,7 +809,12 @@ static DSO_FUNC_TYPE win32_globallookup(const char *name) module_next = (MODULE32)GetProcAddress(dll,"Module32Next"); hModuleSnap = (*create_snap)(TH32CS_SNAPMODULE,0); - if( hModuleSnap == INVALID_HANDLE_VALUE ) return NULL; + if( hModuleSnap == INVALID_HANDLE_VALUE ) + { + FreeLibrary(dll); + DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED); + return NULL; + } me32.dwSize = sizeof(me32); -- 2.25.1