quartz: Remove redundant NULL checks before CoTaskMemFree().

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-07-08 10:10:14 +02:00 committed by Alexandre Julliard
parent 69039f064a
commit b5a7853b86
4 changed files with 5 additions and 11 deletions

View File

@ -349,11 +349,8 @@ static HRESULT WINAPI AVIDec_BreakConnect(TransformFilter *tf, PIN_DIRECTION dir
{ {
if (This->hvid) if (This->hvid)
ICClose(This->hvid); ICClose(This->hvid);
if (This->pBihIn) CoTaskMemFree(This->pBihIn);
CoTaskMemFree(This->pBihIn); CoTaskMemFree(This->pBihOut);
if (This->pBihOut)
CoTaskMemFree(This->pBihOut);
This->hvid = NULL; This->hvid = NULL;
This->pBihIn = NULL; This->pBihIn = NULL;
This->pBihOut = NULL; This->pBihOut = NULL;

View File

@ -609,8 +609,7 @@ static void FM2_DeleteRegFilter(REGFILTER2 * prf2)
for (i = 0; i < prf2->u.s2.cPins2; i++) for (i = 0; i < prf2->u.s2.cPins2; i++)
{ {
UINT j; UINT j;
if (prf2->u.s2.rgPins2[i].clsPinCategory) CoTaskMemFree((void*)prf2->u.s2.rgPins2[i].clsPinCategory);
CoTaskMemFree((LPVOID)prf2->u.s2.rgPins2[i].clsPinCategory);
for (j = 0; j < prf2->u.s2.rgPins2[i].nMediaTypes; j++) for (j = 0; j < prf2->u.s2.rgPins2[i].nMediaTypes; j++)
{ {

View File

@ -589,8 +589,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin, ALLOCATO
if (FAILED(hr)) if (FAILED(hr))
{ {
if (amt.pbFormat) CoTaskMemFree(amt.pbFormat);
CoTaskMemFree(amt.pbFormat);
ERR("Could not create pin for MPEG audio stream (%x)\n", hr); ERR("Could not create pin for MPEG audio stream (%x)\n", hr);
break; break;
} }

View File

@ -528,8 +528,7 @@ static void test_parse_filter_data(void)
ok(pRegFilter->dwMerit == 0x5fffff,"Incorrect merit returned\n"); ok(pRegFilter->dwMerit == 0x5fffff,"Incorrect merit returned\n");
out: out:
if (pRegFilter) CoTaskMemFree(pRegFilter);
CoTaskMemFree(pRegFilter);
if (psa) if (psa)
{ {
SafeArrayUnaccessData(psa); SafeArrayUnaccessData(psa);