diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index ccc4f68b2ce..c35554f8c83 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -567,7 +567,11 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet, *phFuncAddr = addr; } else + { + CryptFreeOIDFunctionAddress(*phFuncAddr, 0); SetLastError(ERROR_FILE_NOT_FOUND); + *phFuncAddr = NULL; + } } } }