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
610c863e
Commit
610c863e
authored
Oct 18, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Always return TRUE from CertFreeCTLContext.
parent
35131414
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
context.c
dlls/crypt32/context.c
+1
-5
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-3
ctl.c
dlls/crypt32/ctl.c
+2
-4
ctl.c
dlls/crypt32/tests/ctl.c
+10
-2
No files found.
dlls/crypt32/context.c
View file @
610c863e
...
...
@@ -74,14 +74,11 @@ void Context_AddRef(context_t *context)
TRACE
(
"(%p) ref=%d
\n
"
,
context
,
context
->
ref
);
}
BOOL
Context_Release
(
context_t
*
context
)
void
Context_Release
(
context_t
*
context
)
{
BOOL
ret
=
TRUE
;
if
(
context
->
ref
<=
0
)
{
ERR
(
"%p's ref count is %d
\n
"
,
context
,
context
->
ref
);
return
FALSE
;
}
if
(
InterlockedDecrement
(
&
context
->
ref
)
==
0
)
{
...
...
@@ -97,7 +94,6 @@ BOOL Context_Release(context_t *context)
}
else
TRACE
(
"%p's ref count is %d
\n
"
,
context
,
context
->
ref
);
return
ret
;
}
void
Context_CopyProperties
(
const
void
*
to
,
const
void
*
from
)
...
...
dlls/crypt32/crypt32_private.h
View file @
610c863e
...
...
@@ -403,10 +403,8 @@ void Context_AddRef(context_t*) DECLSPEC_HIDDEN;
/* Decrements context's ref count. If context is a link context, releases its
* linked context as well.
* If a data context has its ref count reach 0, calls dataContextFree on it.
* Returns FALSE if the reference count is <= 0 when called.
*/
BOOL
Context_Release
(
context_t
*
context
)
DECLSPEC_HIDDEN
;
void
Context_Release
(
context_t
*
context
)
DECLSPEC_HIDDEN
;
/**
* Context property list functions
...
...
dlls/crypt32/ctl.c
View file @
610c863e
...
...
@@ -500,13 +500,11 @@ PCCTL_CONTEXT WINAPI CertDuplicateCTLContext(PCCTL_CONTEXT pCtlContext)
BOOL
WINAPI
CertFreeCTLContext
(
PCCTL_CONTEXT
pCTLContext
)
{
BOOL
ret
=
TRUE
;
TRACE
(
"(%p)
\n
"
,
pCTLContext
);
if
(
pCTLContext
)
ret
=
Context_Release
(
&
ctl_from_ptr
(
pCTLContext
)
->
base
);
return
ret
;
Context_Release
(
&
ctl_from_ptr
(
pCTLContext
)
->
base
);
return
TRUE
;
}
DWORD
WINAPI
CertEnumCTLContextProperties
(
PCCTL_CONTEXT
pCTLContext
,
...
...
dlls/crypt32/tests/ctl.c
View file @
610c863e
...
...
@@ -190,6 +190,7 @@ static void testCreateCTL(void)
static
void
testDupCTL
(
void
)
{
PCCTL_CONTEXT
context
,
dupContext
;
BOOL
res
;
context
=
CertDuplicateCTLContext
(
NULL
);
ok
(
context
==
NULL
,
"expected NULL
\n
"
);
...
...
@@ -198,8 +199,15 @@ static void testDupCTL(void)
dupContext
=
CertDuplicateCTLContext
(
context
);
ok
(
dupContext
!=
NULL
,
"expected a context
\n
"
);
ok
(
dupContext
==
context
,
"expected identical context addresses
\n
"
);
CertFreeCTLContext
(
dupContext
);
CertFreeCTLContext
(
context
);
res
=
CertFreeCTLContext
(
dupContext
);
ok
(
res
,
"CertFreeCTLContext failed
\n
"
);
res
=
CertFreeCTLContext
(
context
);
ok
(
res
,
"CertFreeCTLContext failed
\n
"
);
res
=
CertFreeCTLContext
(
NULL
);
ok
(
res
,
"CertFreeCTLContext failed
\n
"
);
}
static
void
checkHash
(
const
BYTE
*
data
,
DWORD
dataLen
,
ALG_ID
algID
,
...
...
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