Commit 7226d7f5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

wmp/tests: Fix a minor leak on error path (Coverity).

parent 898db924
...@@ -309,7 +309,7 @@ static BOOL test_wmp(void) ...@@ -309,7 +309,7 @@ static BOOL test_wmp(void)
LONG progress; LONG progress;
IWMPMedia *media; IWMPMedia *media;
static const WCHAR currentPosition[] = {'c','u','r','r','e','n','t','P','o','s','i','t','i','o','n',0}; static const WCHAR currentPosition[] = {'c','u','r','r','e','n','t','P','o','s','i','t','i','o','n',0};
BSTR bstrcurrentPosition = SysAllocString(currentPosition); BSTR bstrcurrentPosition;
hres = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IOleObject, (void**)&oleobj); hres = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IOleObject, (void**)&oleobj);
if(hres == REGDB_E_CLASSNOTREG) { if(hres == REGDB_E_CLASSNOTREG) {
...@@ -344,6 +344,7 @@ static BOOL test_wmp(void) ...@@ -344,6 +344,7 @@ static BOOL test_wmp(void)
ok(hres == S_OK, "get_controls failed: %08x\n", hres); ok(hres == S_OK, "get_controls failed: %08x\n", hres);
ok(controls != NULL, "controls = NULL\n"); ok(controls != NULL, "controls = NULL\n");
bstrcurrentPosition = SysAllocString(currentPosition);
hres = IWMPControls_get_isAvailable(controls, bstrcurrentPosition, &vbool); hres = IWMPControls_get_isAvailable(controls, bstrcurrentPosition, &vbool);
ok(hres == S_OK, "IWMPControls_get_isAvailable failed: %08x\n", hres); ok(hres == S_OK, "IWMPControls_get_isAvailable failed: %08x\n", hres);
ok(vbool == VARIANT_FALSE, "unexpected value\n"); ok(vbool == VARIANT_FALSE, "unexpected value\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment