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
62df03af
Commit
62df03af
authored
Mar 17, 2020
by
Serge Gautherie
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Use standard refcount in CRYPTPROV.
Signed-off-by:
Serge Gautherie
<
winehq-git_serge_180711@gautherie.fr
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9cc8b501
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
crypt.c
dlls/advapi32/crypt.c
+2
-3
crypt.h
dlls/advapi32/crypt.h
+1
-1
No files found.
dlls/advapi32/crypt.c
View file @
62df03af
...
...
@@ -636,7 +636,7 @@ BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFl
return
FALSE
;
}
pProv
->
refcount
++
;
InterlockedIncrement
(
&
pProv
->
refcount
)
;
return
TRUE
;
}
...
...
@@ -672,8 +672,7 @@ BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
return
FALSE
;
}
pProv
->
refcount
--
;
if
(
pProv
->
refcount
<=
0
)
if
(
InterlockedDecrement
(
&
pProv
->
refcount
)
==
0
)
{
ret
=
pProv
->
pFuncs
->
pCPReleaseContext
(
pProv
->
hPrivate
,
dwFlags
);
pProv
->
dwMagic
=
0
;
...
...
dlls/advapi32/crypt.h
View file @
62df03af
...
...
@@ -63,7 +63,7 @@ typedef struct tagPROVFUNCS
typedef
struct
tagCRYPTPROV
{
DWORD
dwMagic
;
UINT
refcount
;
LONG
refcount
;
HMODULE
hModule
;
PPROVFUNCS
pFuncs
;
HCRYPTPROV
hPrivate
;
/*CSP's handle - Should not be given to application under any circumstances!*/
...
...
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