Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e4a68fd5
Commit
e4a68fd5
authored
Mar 30, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Fix memory leaks on error paths in WsCreateReader.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f162da49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
reader.c
dlls/webservices/reader.c
+12
-8
No files found.
dlls/webservices/reader.c
View file @
e4a68fd5
...
...
@@ -464,6 +464,15 @@ static void clear_prefixes( struct prefix *prefixes, ULONG count )
}
}
static
void
free_reader
(
struct
reader
*
reader
)
{
if
(
!
reader
)
return
;
destroy_nodes
(
reader
->
root
);
clear_prefixes
(
reader
->
prefixes
,
reader
->
nb_prefixes
);
heap_free
(
reader
->
prefixes
);
heap_free
(
reader
);
}
static
HRESULT
set_prefix
(
struct
prefix
*
prefix
,
const
WS_XML_STRING
*
str
,
const
WS_XML_STRING
*
ns
)
{
if
(
str
)
...
...
@@ -608,14 +617,14 @@ HRESULT WINAPI WsCreateReader( const WS_XML_READER_PROPERTY *properties, ULONG c
hr
=
set_reader_prop
(
reader
,
properties
[
i
].
id
,
properties
[
i
].
value
,
properties
[
i
].
valueSize
);
if
(
hr
!=
S_OK
)
{
heap_free
(
reader
);
free_reader
(
reader
);
return
hr
;
}
}
if
((
hr
=
read_init_state
(
reader
))
!=
S_OK
)
{
heap_free
(
reader
);
free_reader
(
reader
);
return
hr
;
}
...
...
@@ -631,12 +640,7 @@ void WINAPI WsFreeReader( WS_XML_READER *handle )
struct
reader
*
reader
=
(
struct
reader
*
)
handle
;
TRACE
(
"%p
\n
"
,
handle
);
if
(
!
reader
)
return
;
destroy_nodes
(
reader
->
root
);
clear_prefixes
(
reader
->
prefixes
,
reader
->
nb_prefixes
);
heap_free
(
reader
->
prefixes
);
heap_free
(
reader
);
free_reader
(
reader
);
}
/**************************************************************************
...
...
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