Commit df53b501 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed a few coverity issues.

parent 71d185d7
...@@ -800,15 +800,16 @@ HRESULT start_binding(HTMLInnerWindow *inner_window, BSCallback *bscallback, IBi ...@@ -800,15 +800,16 @@ HRESULT start_binding(HTMLInnerWindow *inner_window, BSCallback *bscallback, IBi
/* NOTE: IE7 calls IsSystemMoniker here*/ /* NOTE: IE7 calls IsSystemMoniker here*/
if(bctx) { if(bctx) {
RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0); hres = RegisterBindStatusCallback(bctx, &bscallback->IBindStatusCallback_iface, NULL, 0);
IBindCtx_AddRef(bctx); if(SUCCEEDED(hres))
IBindCtx_AddRef(bctx);
}else { }else {
hres = CreateAsyncBindCtx(0, &bscallback->IBindStatusCallback_iface, NULL, &bctx); hres = CreateAsyncBindCtx(0, &bscallback->IBindStatusCallback_iface, NULL, &bctx);
if(FAILED(hres)) { }
WARN("CreateAsyncBindCtx failed: %08x\n", hres);
bscallback->vtbl->stop_binding(bscallback, hres); if(FAILED(hres)) {
return hres; bscallback->vtbl->stop_binding(bscallback, hres);
} return hres;
} }
hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str); hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str);
...@@ -1473,7 +1474,6 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result) ...@@ -1473,7 +1474,6 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result)
return; return;
if(!doc->client_cmdtrg) if(!doc->client_cmdtrg)
if(FAILED(hres))
return; return;
bound.lLbound = 0; bound.lLbound = 0;
......
...@@ -280,6 +280,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro ...@@ -280,6 +280,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro
return nsres; return nsres;
} }
assert(profile_directory != NULL);
return nsIFile_Clone(profile_directory, _retval); return nsIFile_Clone(profile_directory, _retval);
} }
......
...@@ -1042,10 +1042,16 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen ...@@ -1042,10 +1042,16 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
if(TRACE_ON(mshtml)) { if(TRACE_ON(mshtml)) {
HRESULT hres;
BSTR uri_str; BSTR uri_str;
IUri_GetDisplayUri(This->uri->uri, &uri_str);
TRACE("opening %s\n", debugstr_w(uri_str)); hres = IUri_GetDisplayUri(This->uri->uri, &uri_str);
SysFreeString(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) { if(This->uri->is_doc_uri) {
......
...@@ -1301,8 +1301,10 @@ static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface, ...@@ -1301,8 +1301,10 @@ static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
return hres; return hres;
hres = create_ip_window(ppDoc); hres = create_ip_window(ppDoc);
if(FAILED(hres)) if(FAILED(hres)) {
IOleInPlaceFrame_Release(ip_frame);
return hres; return hres;
}
*ppFrame = ip_frame; *ppFrame = ip_frame;
*lprcPosRect = This->rect; *lprcPosRect = This->rect;
......
...@@ -218,6 +218,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr ...@@ -218,6 +218,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
LPCWSTR text = NULL; LPCWSTR text = NULL;
DWORD data_len; DWORD data_len;
BYTE *data; BYTE *data;
HRESULT hres;
static const WCHAR html_begin[] = {0xfeff,'<','H','T','M','L','>',0}; static const WCHAR html_begin[] = {0xfeff,'<','H','T','M','L','>',0};
static const WCHAR html_end[] = {'<','/','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 ...@@ -237,7 +238,9 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
memset(&bindinfo, 0, sizeof(bindinfo)); memset(&bindinfo, 0, sizeof(bindinfo));
bindinfo.cbSize = sizeof(BINDINFO); bindinfo.cbSize = sizeof(BINDINFO);
IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
if(FAILED(hres))
return hres;
ReleaseBindInfo(&bindinfo); ReleaseBindInfo(&bindinfo);
TRACE("bindf %x\n", grfBINDF); TRACE("bindf %x\n", grfBINDF);
...@@ -605,7 +608,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, ...@@ -605,7 +608,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
memset(&bindinfo, 0, sizeof(bindinfo)); memset(&bindinfo, 0, sizeof(bindinfo));
bindinfo.cbSize = sizeof(BINDINFO); bindinfo.cbSize = sizeof(BINDINFO);
IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo); hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
if(FAILED(hres))
return hres;
ReleaseBindInfo(&bindinfo); ReleaseBindInfo(&bindinfo);
len = strlenW(szUrl)+16; len = strlenW(szUrl)+16;
......
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