28 May
2025
28 May
'25
3:43 p.m.
Dmitry Timoshkov (@dmitry) commented about dlls/taskschd/regtask.c:
+ } + if (!task_names) + { + VariantClear(&converted_index); + return E_INVALIDARG; + } + + hr = TaskDefinition_create(&definition); + if (FAILED(hr)) + goto cleanup; + hr = RegisteredTask_create(collection->path, task_names[0], definition, TASK_VALIDATE_ONLY, TASK_LOGON_INTERACTIVE_TOKEN, regtask, FALSE); + if (FAILED(hr)) + goto cleanup; + + hr = S_OK; +cleanup: It should be possible to avoid using 'goto' and forcing 'hr' to a specific value.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8166#note_104821