urlmon: Avoid memory leaks (coverity).
This commit is contained in:
parent
b4b396a957
commit
99a0c55a8f
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue