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
58642340
Commit
58642340
authored
Jan 25, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Don't release reader input reference on failure, as newer versions do.
parent
07e2730c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
reader.c
dlls/xmllite/reader.c
+3
-12
reader.c
dlls/xmllite/tests/reader.c
+3
-1
No files found.
dlls/xmllite/reader.c
View file @
58642340
...
@@ -103,11 +103,8 @@ static ULONG WINAPI xmlreader_Release(IXmlReader *iface)
...
@@ -103,11 +103,8 @@ static ULONG WINAPI xmlreader_Release(IXmlReader *iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
if
(
ref
==
0
)
{
{
if
(
This
->
input
)
if
(
This
->
input
)
IUnknown_Release
(
This
->
input
);
{
if
(
This
->
stream
)
IUnknown_Release
(
This
->
stream
);
IUnknown_Release
(
This
->
stream
);
IUnknown_Release
(
This
->
input
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
@@ -154,13 +151,7 @@ static HRESULT WINAPI xmlreader_SetInput(IXmlReader* iface, IUnknown *input)
...
@@ -154,13 +151,7 @@ static HRESULT WINAPI xmlreader_SetInput(IXmlReader* iface, IUnknown *input)
/* set stream for supplied IXmlReaderInput */
/* set stream for supplied IXmlReaderInput */
hr
=
xmlreaderinput_query_for_stream
(
This
->
input
,
(
void
**
)
&
This
->
stream
);
hr
=
xmlreaderinput_query_for_stream
(
This
->
input
,
(
void
**
)
&
This
->
stream
);
if
(
hr
!=
S_OK
)
if
(
hr
==
S_OK
)
{
/* IXmlReaderInput doesn't provide streaming interface */
IUnknown_Release
(
This
->
input
);
This
->
input
=
NULL
;
}
else
This
->
state
=
XmlReadState_Initial
;
This
->
state
=
XmlReadState_Initial
;
return
hr
;
return
hr
;
...
...
dlls/xmllite/tests/reader.c
View file @
58642340
...
@@ -440,6 +440,7 @@ static void test_readerinput(void)
...
@@ -440,6 +440,7 @@ static void test_readerinput(void)
IUnknown_Release
(
reader_input
);
IUnknown_Release
(
reader_input
);
IUnknown_Release
(
reader_input
);
IUnknown_Release
(
reader_input
);
IUnknown_Release
(
reader_input
);
IStream_Release
(
stream
);
IStream_Release
(
stream
);
/* test input interface selection sequence */
/* test input interface selection sequence */
...
@@ -479,7 +480,8 @@ static void test_readerinput(void)
...
@@ -479,7 +480,8 @@ static void test_readerinput(void)
IUnknown_Release
(
input
);
IUnknown_Release
(
input
);
ref
=
IUnknown_AddRef
(
reader_input
);
ref
=
IUnknown_AddRef
(
reader_input
);
ok
(
ref
==
2
,
"Expected 2, got %d
\n
"
,
ref
);
ok
(
ref
==
3
||
broken
(
ref
==
2
)
/* versions 1.0.x and 1.1.x - XP, Vista */
,
"Expected 3, got %d
\n
"
,
ref
);
IUnknown_Release
(
reader_input
);
IUnknown_Release
(
reader_input
);
/* repeat another time, no check or caching here */
/* repeat another time, no check or caching here */
input_iids
.
count
=
0
;
input_iids
.
count
=
0
;
...
...
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