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
f9a475c8
Commit
f9a475c8
authored
Dec 09, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Fix memory leak reading stored keys.
parent
90b1bcc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
rsaenh.c
dlls/rsaenh/rsaenh.c
+8
-2
No files found.
dlls/rsaenh/rsaenh.c
View file @
f9a475c8
...
...
@@ -1380,12 +1380,18 @@ static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, cons
(
OBJECTHDR
**
)
&
pKeyContainer
))
return
(
HCRYPTPROV
)
INVALID_HANDLE_VALUE
;
/* read_key_value calls import_key, which calls import_private_key,
* which implicitly installs the key value into the appropriate key
* container key. Thus the ref count is incremented twice, once for
* the output key value, and once for the implicit install, and needs
* to be decremented to balance the two.
*/
if
(
read_key_value
(
hKeyContainer
,
hKey
,
AT_KEYEXCHANGE
,
dwProtectFlags
,
&
hCryptKey
))
pKeyContainer
->
hKeyExchangeKeyPair
=
hCryptKey
;
release_handle
(
&
handle_table
,
hCryptKey
,
RSAENH_MAGIC_KEY
)
;
if
(
read_key_value
(
hKeyContainer
,
hKey
,
AT_SIGNATURE
,
dwProtectFlags
,
&
hCryptKey
))
pKeyContainer
->
hSignatureKeyPair
=
hCryptKey
;
release_handle
(
&
handle_table
,
hCryptKey
,
RSAENH_MAGIC_KEY
)
;
}
return
hKeyContainer
;
...
...
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