Alfred Agrell (@Alcaro) commented about dlls/taskschd/regtask.c:
- if (FAILED(hr))
- {
VariantClear(&converted_index);return hr;- }
- 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))
Other RegisteredTask_create callers Release the definition object if hr != S_OK.