@@ -543,18 +543,15 @@ static const IProvideMultipleClassInfoVtbl ProvideMultipleClassInfoVtbl =
543543 ProvideMultipleClassInfo_GetInfoOfIndex
544544};
545545
546- static HRESULT init_automation_object (AutomationObject * This , MSIHANDLE msiHandle , tid_t tid )
546+ static void init_automation_object (AutomationObject * This , MSIHANDLE msiHandle , tid_t tid )
547547{
548548 TRACE ("(%p, %d, %s)\n" , This , msiHandle , debugstr_guid (get_riid_from_tid (tid )));
549549
550550 This -> IDispatch_iface .lpVtbl = & AutomationObjectVtbl ;
551551 This -> IProvideMultipleClassInfo_iface .lpVtbl = & ProvideMultipleClassInfoVtbl ;
552552 This -> ref = 1 ;
553-
554553 This -> msiHandle = msiHandle ;
555554 This -> tid = tid ;
556-
557- return S_OK ;
558555}
559556
560557/*
@@ -1002,21 +999,15 @@ static HRESULT record_invoke(
1002999static HRESULT create_record (MSIHANDLE msiHandle , IDispatch * * disp )
10031000{
10041001 AutomationObject * record ;
1005- HRESULT hr ;
10061002
10071003 record = msi_alloc (sizeof (* record ));
10081004 if (!record ) return E_OUTOFMEMORY ;
10091005
1010- hr = init_automation_object (record , msiHandle , Record_tid );
1011- if (hr != S_OK )
1012- {
1013- msi_free (record );
1014- return hr ;
1015- }
1006+ init_automation_object (record , msiHandle , Record_tid );
10161007
10171008 * disp = & record -> IDispatch_iface ;
10181009
1019- return hr ;
1010+ return S_OK ;
10201011}
10211012
10221013static HRESULT list_invoke (
@@ -1123,12 +1114,7 @@ static HRESULT create_list(const WCHAR *product, IDispatch **dispatch)
11231114 list = msi_alloc_zero (sizeof (ListObject ));
11241115 if (!list ) return E_OUTOFMEMORY ;
11251116
1126- hr = init_automation_object (& list -> autoobj , 0 , StringList_tid );
1127- if (hr != S_OK )
1128- {
1129- msi_free (list );
1130- return hr ;
1131- }
1117+ init_automation_object (& list -> autoobj , 0 , StringList_tid );
11321118
11331119 * dispatch = & list -> autoobj .IDispatch_iface ;
11341120
@@ -2442,7 +2428,6 @@ static HRESULT installer_invoke(
24422428HRESULT create_msiserver (IUnknown * outer , void * * ppObj )
24432429{
24442430 AutomationObject * installer ;
2445- HRESULT hr ;
24462431
24472432 TRACE ("(%p %p)\n" , outer , ppObj );
24482433
@@ -2452,99 +2437,70 @@ HRESULT create_msiserver(IUnknown *outer, void **ppObj)
24522437 installer = msi_alloc (sizeof (AutomationObject ));
24532438 if (!installer ) return E_OUTOFMEMORY ;
24542439
2455- hr = init_automation_object (installer , 0 , Installer_tid );
2456- if (hr != S_OK )
2457- {
2458- msi_free (installer );
2459- return hr ;
2460- }
2440+ init_automation_object (installer , 0 , Installer_tid );
24612441
24622442 * ppObj = & installer -> IDispatch_iface ;
24632443
2464- return hr ;
2444+ return S_OK ;
24652445}
24662446
24672447HRESULT create_session (MSIHANDLE msiHandle , IDispatch * installer , IDispatch * * disp )
24682448{
24692449 SessionObject * session ;
2470- HRESULT hr ;
24712450
24722451 session = msi_alloc (sizeof (SessionObject ));
24732452 if (!session ) return E_OUTOFMEMORY ;
24742453
2475- hr = init_automation_object (& session -> autoobj , msiHandle , Session_tid );
2476- if (hr != S_OK )
2477- {
2478- msi_free (session );
2479- return hr ;
2480- }
2454+ init_automation_object (& session -> autoobj , msiHandle , Session_tid );
24812455
24822456 session -> installer = installer ;
24832457 * disp = & session -> autoobj .IDispatch_iface ;
24842458
2485- return hr ;
2459+ return S_OK ;
24862460}
24872461
24882462static HRESULT create_database (MSIHANDLE msiHandle , IDispatch * * dispatch )
24892463{
24902464 AutomationObject * database ;
2491- HRESULT hr ;
24922465
24932466 TRACE ("(%d %p)\n" , msiHandle , dispatch );
24942467
24952468 database = msi_alloc (sizeof (AutomationObject ));
24962469 if (!database ) return E_OUTOFMEMORY ;
24972470
2498- hr = init_automation_object (database , msiHandle , Database_tid );
2499- if (hr != S_OK )
2500- {
2501- msi_free (database );
2502- return hr ;
2503- }
2471+ init_automation_object (database , msiHandle , Database_tid );
25042472
25052473 * dispatch = & database -> IDispatch_iface ;
25062474
2507- return hr ;
2475+ return S_OK ;
25082476}
25092477
25102478static HRESULT create_view (MSIHANDLE msiHandle , IDispatch * * dispatch )
25112479{
25122480 AutomationObject * view ;
2513- HRESULT hr ;
25142481
25152482 TRACE ("(%d %p)\n" , msiHandle , dispatch );
25162483
25172484 view = msi_alloc (sizeof (AutomationObject ));
25182485 if (!view ) return E_OUTOFMEMORY ;
25192486
2520- hr = init_automation_object (view , msiHandle , View_tid );
2521- if (hr != S_OK )
2522- {
2523- msi_free (view );
2524- return hr ;
2525- }
2487+ init_automation_object (view , msiHandle , View_tid );
25262488
25272489 * dispatch = & view -> IDispatch_iface ;
25282490
2529- return hr ;
2491+ return S_OK ;
25302492}
25312493
25322494static HRESULT create_summaryinfo (MSIHANDLE msiHandle , IDispatch * * disp )
25332495{
25342496 AutomationObject * info ;
2535- HRESULT hr ;
25362497
25372498 info = msi_alloc (sizeof (* info ));
25382499 if (!info ) return E_OUTOFMEMORY ;
25392500
2540- hr = init_automation_object (info , msiHandle , SummaryInfo_tid );
2541- if (hr != S_OK )
2542- {
2543- msi_free (info );
2544- return hr ;
2545- }
2501+ init_automation_object (info , msiHandle , SummaryInfo_tid );
25462502
25472503 * disp = & info -> IDispatch_iface ;
25482504
2549- return hr ;
2505+ return S_OK ;
25502506}
0 commit comments