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
2907ad98
Commit
2907ad98
authored
Mar 01, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Avoid unneeded variant copy in setAttribute(), leak fixed as a side effect.
parent
d4d92616
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
element.c
dlls/msxml3/element.c
+15
-8
No files found.
dlls/msxml3/element.c
View file @
2907ad98
...
...
@@ -1228,7 +1228,6 @@ static HRESULT WINAPI domelem_setAttribute(
xmlChar
*
xml_name
,
*
xml_value
,
*
local
,
*
prefix
;
xmlNodePtr
element
;
HRESULT
hr
;
VARIANT
var
;
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
name
),
debugstr_variant
(
&
value
));
...
...
@@ -1236,16 +1235,25 @@ static HRESULT WINAPI domelem_setAttribute(
if
(
!
element
)
return
E_FAIL
;
VariantInit
(
&
var
);
hr
=
VariantChangeType
(
&
var
,
&
value
,
0
,
VT_BSTR
);
if
(
hr
!=
S_OK
)
if
(
V_VT
(
&
value
)
!=
VT_BSTR
)
{
FIXME
(
"VariantChangeType failed
\n
"
);
return
hr
;
VARIANT
var
;
VariantInit
(
&
var
);
hr
=
VariantChangeType
(
&
var
,
&
value
,
0
,
VT_BSTR
);
if
(
hr
!=
S_OK
)
{
FIXME
(
"VariantChangeType failed
\n
"
);
return
hr
;
}
xml_value
=
xmlchar_from_wchar
(
V_BSTR
(
&
var
));
VariantClear
(
&
var
);
}
else
xml_value
=
xmlchar_from_wchar
(
V_BSTR
(
&
value
));
xml_name
=
xmlchar_from_wchar
(
name
);
xml_value
=
xmlchar_from_wchar
(
V_BSTR
(
&
var
)
);
if
((
local
=
xmlSplitQName2
(
xml_name
,
&
prefix
)))
{
...
...
@@ -1268,7 +1276,6 @@ static HRESULT WINAPI domelem_setAttribute(
heap_free
(
xml_value
);
heap_free
(
xml_name
);
VariantClear
(
&
var
);
return
hr
;
}
...
...
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