From a620a84f4c76d07f00a84c78f55ae8cc3e093a1b Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 22 Feb 2010 12:25:45 +0100 Subject: [PATCH] msi/tests: Free exception information. Found by Valgrind. --- dlls/msi/tests/automation.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index edc6cbe8a60..99fb7783e42 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -1808,6 +1808,7 @@ static void test_Session(IDispatch *pSession) static WCHAR szEmpty[] = { 0 }; static WCHAR szEquals[] = { '=',0 }; static WCHAR szPropertyName[] = { 'P','r','o','p','e','r','t','y',',','N','a','m','e',0 }; + static WCHAR szModeFlag[] = { 'M','o','d','e',',','F','l','a','g',0 }; WCHAR stringw[MAX_PATH]; CHAR string[MAX_PATH]; UINT len; @@ -1880,14 +1881,19 @@ static void test_Session(IDispatch *pSession) hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, TRUE); todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag); + hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTNOW, &bool); ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); ok(bool, "Reboot now mode is %d, expected 1\n", bool); + hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, FALSE); /* set it again so we don't reboot */ todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); + if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag); hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, TRUE); ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult 0x%08x\n", hr); + ok_exception(hr, szModeFlag); /* Session::Database, get */ hr = Session_Database(pSession, &pDatabase); -- 2.11.4.GIT