Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b2643d38
Commit
b2643d38
authored
Nov 28, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fix handling of NULL object site (Coverity).
parent
21be19a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
httprequest.c
dlls/msxml3/httprequest.c
+18
-15
domdoc.c
dlls/msxml3/tests/domdoc.c
+3
-0
No files found.
dlls/msxml3/httprequest.c
View file @
b2643d38
...
...
@@ -1444,34 +1444,37 @@ static HRESULT WINAPI httprequest_ObjectWithSite_GetSite( IObjectWithSite *iface
static
HRESULT
WINAPI
httprequest_ObjectWithSite_SetSite
(
IObjectWithSite
*
iface
,
IUnknown
*
punk
)
{
httprequest
*
This
=
impl_from_IObjectWithSite
(
iface
);
IServiceProvider
*
provider
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
punk
);
if
(
punk
)
IUnknown_AddRef
(
punk
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
punk
);
if
(
This
->
site
)
IUnknown_Release
(
This
->
site
);
SysFreeString
(
This
->
siteurl
);
This
->
siteurl
=
NULL
;
This
->
site
=
punk
;
hr
=
IUnknown_QueryInterface
(
This
->
site
,
&
IID_IServiceProvider
,
(
void
**
)
&
provider
);
if
(
hr
==
S_OK
)
if
(
punk
)
{
IHTMLDocument2
*
doc
;
IServiceProvider
*
provider
;
HRESULT
hr
;
IUnknown_AddRef
(
punk
);
hr
=
I
ServiceProvider_QueryService
(
provider
,
&
SID_SContainerDispatch
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
hr
=
I
Unknown_QueryInterface
(
This
->
site
,
&
IID_IServiceProvider
,
(
void
**
)
&
provider
);
if
(
hr
==
S_OK
)
{
SysFreeString
(
This
->
siteurl
)
;
IHTMLDocument2
*
doc
;
hr
=
IHTMLDocument2_get_URL
(
doc
,
&
This
->
siteurl
);
IHTMLDocument2_Release
(
doc
);
TRACE
(
"host url %s, 0x%08x
\n
"
,
debugstr_w
(
This
->
siteurl
),
hr
);
hr
=
IServiceProvider_QueryService
(
provider
,
&
SID_SContainerDispatch
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
if
(
hr
==
S_OK
)
{
hr
=
IHTMLDocument2_get_URL
(
doc
,
&
This
->
siteurl
);
IHTMLDocument2_Release
(
doc
);
TRACE
(
"host url %s, 0x%08x
\n
"
,
debugstr_w
(
This
->
siteurl
),
hr
);
}
IServiceProvider_Release
(
provider
);
}
IServiceProvider_Release
(
provider
);
}
return
S_OK
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
b2643d38
...
...
@@ -5213,6 +5213,9 @@ todo_wine {
EXPECT_REF
(
obj_site
,
1
);
}
hr
=
IObjectWithSite_SetSite
(
obj_site
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IObjectWithSite_AddRef
(
obj_site
);
todo_wine
{
EXPECT_REF
(
obj_site
,
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment