Commit 99a0c55a authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

urlmon: Avoid memory leaks (coverity).

parent b4b396a9
......@@ -1149,7 +1149,10 @@ static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface
task = heap_alloc(sizeof(switch_task_t));
if(!task)
{
heap_free(data);
return E_OUTOFMEMORY;
}
task->data = data;
......
......@@ -5185,8 +5185,10 @@ static HRESULT WINAPI PersistStream_Load(IPersistStream *iface, IStream *pStm)
if(!data)
return E_OUTOFMEMORY;
hr = IStream_Read(pStm, &data->unk1, size-sizeof(DWORD)-2, NULL);
if(FAILED(hr))
if(FAILED(hr)) {
heap_free(data);
return hr;
}
if(size < sizeof(struct persist_uri)) {
heap_free(data);
......@@ -6356,8 +6358,10 @@ HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserve
Uri *uri;
if((uri = get_uri_obj(pIUri))) {
if(!uri->create_flags)
if(!uri->create_flags) {
heap_free(ret);
return E_UNEXPECTED;
}
IUri_AddRef(pIUri);
ret->uri = uri;
......
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