ole32/tests: guard ReleaseStgMedium with SUCCEEDED

Alexandre Julliard julliard at winehq.org
Tue Sep 29 08:29:19 CDT 2009


<Joerg-Cyril.Hoehle at t-systems.com> writes:

> @@ -1401,7 +1405,7 @@ static void test_getdatahere(void)
>      hr = IDataObject_GetDataHere(get, &fmt, &med);
>      ok(hr == S_OK, "got %08x\n", hr);
>      ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed);
> -    ReleaseStgMedium(&med);
> +    if(SUCCEEDED(hr)) ReleaseStgMedium(&med);

I don't think that's correct for the GetDataHere case, it's allocated by
the caller.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list