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
5aa1754b
Commit
5aa1754b
authored
Nov 26, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: No need to keep a reference to a temporarily used stream.
parent
db9d8ebb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
domdoc.c
dlls/msxml3/domdoc.c
+6
-15
No files found.
dlls/msxml3/domdoc.c
View file @
5aa1754b
...
...
@@ -132,9 +132,6 @@ struct domdoc
bsc_t
*
bsc
;
HRESULT
error
;
/* IPersistStream */
IStream
*
stream
;
/* IObjectWithSite*/
IUnknown
*
site
;
...
...
@@ -722,34 +719,31 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream)
{
DWORD
read
,
written
,
len
;
xmlDocPtr
xmldoc
=
NULL
;
IStream
*
hstream
;
HGLOBAL
hglobal
;
BYTE
buf
[
4096
];
HRESULT
hr
;
char
*
ptr
;
if
(
doc
->
stream
)
{
IStream_Release
(
doc
->
stream
);
doc
->
stream
=
NULL
;
}
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
doc
->
stream
);
hstream
=
NULL
;
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
hstream
);
if
(
FAILED
(
hr
))
return
hr
;
do
{
ISequentialStream_Read
(
stream
,
buf
,
sizeof
(
buf
),
&
read
);
hr
=
IStream_Write
(
doc
->
stream
,
buf
,
read
,
&
written
);
hr
=
IStream_Write
(
h
stream
,
buf
,
read
,
&
written
);
}
while
(
SUCCEEDED
(
hr
)
&&
written
!=
0
&&
read
!=
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"failed to copy stream 0x%08x
\n
"
,
hr
);
IStream_Release
(
hstream
);
return
hr
;
}
hr
=
GetHGlobalFromStream
(
doc
->
stream
,
&
hglobal
);
hr
=
GetHGlobalFromStream
(
h
stream
,
&
hglobal
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -922,8 +916,6 @@ static ULONG WINAPI domdoc_Release( IXMLDOMDocument3 *iface )
if
(
This
->
site
)
IUnknown_Release
(
This
->
site
);
destroy_xmlnode
(
&
This
->
node
);
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
for
(
eid
=
0
;
eid
<
EVENTID_LAST
;
eid
++
)
if
(
This
->
events
[
eid
])
IDispatch_Release
(
This
->
events
[
eid
]);
...
...
@@ -3493,7 +3485,6 @@ HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document)
doc
->
resolving
=
0
;
doc
->
properties
=
properties_from_xmlDocPtr
(
xmldoc
);
doc
->
error
=
S_OK
;
doc
->
stream
=
NULL
;
doc
->
site
=
NULL
;
doc
->
safeopt
=
0
;
doc
->
bsc
=
NULL
;
...
...
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