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
0537454e
Commit
0537454e
authored
Aug 27, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Fix memory leak in IPropertyStore::SetValue.
parent
15992994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
propstore.c
dlls/propsys/propstore.c
+14
-2
No files found.
dlls/propsys/propstore.c
View file @
0537454e
...
...
@@ -303,6 +303,7 @@ static HRESULT WINAPI PropertyStore_SetValue(IPropertyStoreCache *iface,
PropertyStore
*
This
=
impl_from_IPropertyStoreCache
(
iface
);
propstore_value
*
value
;
HRESULT
hr
;
PROPVARIANT
temp
;
TRACE
(
"%p,%p,%p
\n
"
,
iface
,
key
,
propvar
);
...
...
@@ -311,7 +312,13 @@ static HRESULT WINAPI PropertyStore_SetValue(IPropertyStoreCache *iface,
hr
=
PropertyStore_LookupValue
(
This
,
key
,
1
,
&
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
PropVariantCopy
(
&
value
->
propvar
,
propvar
);
hr
=
PropVariantCopy
(
&
temp
,
propvar
);
if
(
SUCCEEDED
(
hr
))
{
PropVariantClear
(
&
value
->
propvar
);
value
->
propvar
=
temp
;
}
LeaveCriticalSection
(
&
This
->
lock
);
...
...
@@ -405,6 +412,7 @@ static HRESULT WINAPI PropertyStore_SetValueAndState(IPropertyStoreCache *iface,
PropertyStore
*
This
=
impl_from_IPropertyStoreCache
(
iface
);
propstore_value
*
value
;
HRESULT
hr
;
PROPVARIANT
temp
;
TRACE
(
"%p,%p,%p,%d
\n
"
,
iface
,
key
,
ppropvar
,
state
);
...
...
@@ -413,10 +421,14 @@ static HRESULT WINAPI PropertyStore_SetValueAndState(IPropertyStoreCache *iface,
hr
=
PropertyStore_LookupValue
(
This
,
key
,
1
,
&
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
PropVariantCopy
(
&
value
->
propvar
,
ppropvar
);
hr
=
PropVariantCopy
(
&
temp
,
ppropvar
);
if
(
SUCCEEDED
(
hr
))
{
PropVariantClear
(
&
value
->
propvar
);
value
->
propvar
=
temp
;
value
->
state
=
state
;
}
LeaveCriticalSection
(
&
This
->
lock
);
...
...
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