diff options
author | Andy Polyakov <appro@openssl.org> | 2006-01-01 18:38:59 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2006-01-01 18:38:59 +0000 |
commit | 302ea8c260fa8800ea1e494dd470028e6b00bac7 (patch) | |
tree | 8f2356981a525e36f9ba4969e5e77678075bda53 | |
parent | a1f3462bc005db71ff85d85b97a64fd2a206b05a (diff) |
Fix mapping "leak" in newly introduced win32_globallookup.
-rw-r--r-- | crypto/dso/dso_win32.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |