oleaut32: Always free TLIBATTR in LoadRegTypeLib() (Valgrind).
This commit is contained in:
parent
3b16986a35
commit
0c0fe4efb4
@ -542,12 +542,17 @@ HRESULT WINAPI LoadRegTypeLib(
|
|||||||
TLIBATTR *attr;
|
TLIBATTR *attr;
|
||||||
|
|
||||||
res = ITypeLib_GetLibAttr(*ppTLib, &attr);
|
res = ITypeLib_GetLibAttr(*ppTLib, &attr);
|
||||||
if (res == S_OK && (attr->wMajorVerNum != wVerMajor || attr->wMinorVerNum < wVerMinor))
|
if (res == S_OK)
|
||||||
{
|
{
|
||||||
|
BOOL mismatch = attr->wMajorVerNum != wVerMajor || attr->wMinorVerNum < wVerMinor;
|
||||||
ITypeLib_ReleaseTLibAttr(*ppTLib, attr);
|
ITypeLib_ReleaseTLibAttr(*ppTLib, attr);
|
||||||
ITypeLib_Release(*ppTLib);
|
|
||||||
*ppTLib = NULL;
|
if (mismatch)
|
||||||
res = TYPE_E_LIBNOTREGISTERED;
|
{
|
||||||
|
ITypeLib_Release(*ppTLib);
|
||||||
|
*ppTLib = NULL;
|
||||||
|
res = TYPE_E_LIBNOTREGISTERED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user