mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
mshtml: Fixed a few coverity issues.
This commit is contained in:
parent
71d185d7fe
commit
df53b50171
5 changed files with 28 additions and 14 deletions
|
@ -800,15 +800,16 @@ HRESULT start_binding(HTMLInnerWindow *inner_window, BSCallback *bscallback, IBi
|
|||
/* NOTE: IE7 calls IsSystemMoniker here*/
|
||||
|
||||
if(bctx) {
|
||||
RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0);
|
||||
IBindCtx_AddRef(bctx);
|
||||
hres = RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0);
|
||||
if(SUCCEEDED(hres))
|
||||
IBindCtx_AddRef(bctx);
|
||||
}else {
|
||||
hres = CreateAsyncBindCtx(0, &bscallback->IBindStatusCallback_iface, NULL, &bctx);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CreateAsyncBindCtx failed: %08x\n", hres);
|
||||
bscallback->vtbl->stop_binding(bscallback, hres);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
|
||||
if(FAILED(hres)) {
|
||||
bscallback->vtbl->stop_binding(bscallback, hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str);
|
||||
|
@ -1473,7 +1474,6 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result)
|
|||
return;
|
||||
|
||||
if(!doc->client_cmdtrg)
|
||||
if(FAILED(hres))
|
||||
return;
|
||||
|
||||
bound.lLbound = 0;
|
||||
|
|
|
@ -280,6 +280,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro
|
|||
return nsres;
|
||||
}
|
||||
|
||||
assert(profile_directory != NULL);
|
||||
return nsIFile_Clone(profile_directory, _retval);
|
||||
}
|
||||
|
||||
|
|
|
@ -1042,10 +1042,16 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
if(TRACE_ON(mshtml)) {
|
||||
HRESULT hres;
|
||||
BSTR uri_str;
|
||||
IUri_GetDisplayUri(This->uri->uri, &uri_str);
|
||||
TRACE("opening %s\n", debugstr_w(uri_str));
|
||||
SysFreeString(uri_str);
|
||||
|
||||
hres = IUri_GetDisplayUri(This->uri->uri, &uri_str);
|
||||
if(SUCCEEDED(hres)) {
|
||||
TRACE("opening %s\n", debugstr_w(uri_str));
|
||||
SysFreeString(uri_str);
|
||||
}else {
|
||||
WARN("GetDisplayUri failed: %08x\n", hres);
|
||||
}
|
||||
}
|
||||
|
||||
if(This->uri->is_doc_uri) {
|
||||
|
|
|
@ -1301,8 +1301,10 @@ static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
|
|||
return hres;
|
||||
|
||||
hres = create_ip_window(ppDoc);
|
||||
if(FAILED(hres))
|
||||
if(FAILED(hres)) {
|
||||
IOleInPlaceFrame_Release(ip_frame);
|
||||
return hres;
|
||||
}
|
||||
|
||||
*ppFrame = ip_frame;
|
||||
*lprcPosRect = This->rect;
|
||||
|
|
|
@ -218,6 +218,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
|
|||
LPCWSTR text = NULL;
|
||||
DWORD data_len;
|
||||
BYTE *data;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR html_begin[] = {0xfeff,'<','H','T','M','L','>',0};
|
||||
static const WCHAR html_end[] = {'<','/','H','T','M','L','>',0};
|
||||
|
@ -237,7 +238,9 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
|
|||
|
||||
memset(&bindinfo, 0, sizeof(bindinfo));
|
||||
bindinfo.cbSize = sizeof(BINDINFO);
|
||||
IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
ReleaseBindInfo(&bindinfo);
|
||||
|
||||
TRACE("bindf %x\n", grfBINDF);
|
||||
|
@ -605,7 +608,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
|||
|
||||
memset(&bindinfo, 0, sizeof(bindinfo));
|
||||
bindinfo.cbSize = sizeof(BINDINFO);
|
||||
IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
ReleaseBindInfo(&bindinfo);
|
||||
|
||||
len = strlenW(szUrl)+16;
|
||||
|
|
Loading…
Reference in a new issue