Commit eb87ede3 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

taskschd: Use heap_strdupW to allocate the interval in TaskSettings_put_RestartInterval.

parent d052ff0f
......@@ -925,12 +925,12 @@ static HRESULT WINAPI TaskSettings_get_RestartInterval(ITaskSettings *iface, BST
static HRESULT WINAPI TaskSettings_put_RestartInterval(ITaskSettings *iface, BSTR interval)
{
TaskSettings *taskset = impl_from_ITaskSettings(iface);
BSTR str = NULL;
WCHAR *str = NULL;
TRACE("%p,%s\n", iface, debugstr_w(interval));
if (interval && !(str = SysAllocString(interval))) return E_OUTOFMEMORY;
SysFreeString(taskset->restart_interval);
if (interval && !(str = heap_strdupW(interval))) return E_OUTOFMEMORY;
heap_free(taskset->restart_interval);
taskset->restart_interval = str;
return S_OK;
......
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