Module: wine Branch: refs/heads/master Commit: eb885a750f0677cb2d50f4969862065962471431 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=eb885a750f0677cb2d50f496...
Author: Robert Shearman rob@codeweavers.com Date: Mon Jul 24 11:45:30 2006 +0100
oleaut32: Initialize pRetVal in ITypeInfo::Invoke before calling VariantCopyInd as native doesn't assume that it doesn't contain valid data.
---
dlls/oleaut32/typelib.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 52aae92..3ba1b4e 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5391,8 +5391,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke }
if (pVarResult) + { + VariantInit(pVarResult); /* deref return value */ hres = VariantCopyInd(pVarResult, prgpvarg[i]); + }
/* free data stored in varresult. Note that * VariantClear doesn't do what we want because we are