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
c72570ce
Commit
c72570ce
authored
Oct 14, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use Context_Release instead of WINE_CONTEXT_INTERFACE.
parent
76066d1c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
17 deletions
+12
-17
collectionstore.c
dlls/crypt32/collectionstore.c
+1
-1
context.c
dlls/crypt32/context.c
+3
-3
crypt32_private.h
dlls/crypt32/crypt32_private.h
+0
-2
object.c
dlls/crypt32/object.c
+1
-1
regstore.c
dlls/crypt32/regstore.c
+2
-2
serialize.c
dlls/crypt32/serialize.c
+5
-5
store.c
dlls/crypt32/store.c
+0
-3
No files found.
dlls/crypt32/collectionstore.c
View file @
c72570ce
...
...
@@ -163,7 +163,7 @@ static void *CRYPT_CollectionAdvanceEnum(WINE_COLLECTIONSTORE *store,
child
=
Context_GetLinkedContext
(
pPrev
);
Context_AddRef
(
context_from_ptr
(
child
));
child
=
contextFuncs
->
enumContext
(
storeEntry
->
store
,
child
);
contextInterface
->
free
(
pPrev
);
Context_Release
(
context_from_ptr
(
pPrev
)
);
pPrev
=
NULL
;
}
else
...
...
dlls/crypt32/context.c
View file @
c72570ce
...
...
@@ -206,7 +206,7 @@ void *ContextList_Add(struct ContextList *list, void *toLink, void *toReplace)
entry
->
prev
->
next
=
entry
;
entry
->
next
->
prev
=
entry
;
existing
->
prev
=
existing
->
next
=
existing
;
list
->
contextInterface
->
free
(
toReplace
);
Context_Release
(
context_from_ptr
(
toReplace
)
);
}
else
list_add_head
(
&
list
->
contexts
,
entry
);
...
...
@@ -226,7 +226,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
struct
list
*
prevEntry
=
ContextList_ContextToEntry
(
list
,
pPrev
);
listNext
=
list_next
(
&
list
->
contexts
,
prevEntry
);
list
->
contextInterface
->
free
(
pPrev
);
Context_Release
(
context_from_ptr
(
pPrev
)
);
}
else
listNext
=
list_next
(
&
list
->
contexts
,
&
list
->
contexts
);
...
...
@@ -270,7 +270,7 @@ static void ContextList_Empty(struct ContextList *list)
TRACE
(
"removing %p
\n
"
,
context
);
list_remove
(
entry
);
list
->
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
}
LeaveCriticalSection
(
&
list
->
cs
);
}
...
...
dlls/crypt32/crypt32_private.h
View file @
c72570ce
...
...
@@ -226,7 +226,6 @@ typedef BOOL (WINAPI *SetContextPropertyFunc)(const void *context,
DWORD
dwPropID
,
DWORD
dwFlags
,
const
void
*
pvData
);
typedef
BOOL
(
WINAPI
*
SerializeElementFunc
)(
const
void
*
context
,
DWORD
dwFlags
,
BYTE
*
pbElement
,
DWORD
*
pcbElement
);
typedef
BOOL
(
WINAPI
*
FreeContextFunc
)(
const
void
*
context
);
typedef
BOOL
(
WINAPI
*
DeleteContextFunc
)(
const
void
*
contex
);
/* An abstract context (certificate, CRL, or CTL) interface */
...
...
@@ -240,7 +239,6 @@ typedef struct _WINE_CONTEXT_INTERFACE
GetContextPropertyFunc
getProp
;
SetContextPropertyFunc
setProp
;
SerializeElementFunc
serialize
;
FreeContextFunc
free
;
DeleteContextFunc
deleteFromStore
;
}
WINE_CONTEXT_INTERFACE
;
...
...
dlls/crypt32/object.c
View file @
c72570ce
...
...
@@ -279,7 +279,7 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
end:
if
(
contextInterface
&&
context
)
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
if
(
blob
==
&
fileBlob
)
CryptMemFree
(
blob
->
pbData
);
TRACE
(
"returning %d
\n
"
,
ret
);
...
...
dlls/crypt32/regstore.c
View file @
c72570ce
...
...
@@ -143,7 +143,7 @@ static void CRYPT_RegReadSerializedFromReg(HKEY key, DWORD contextType,
else
TRACE
(
"hash doesn't match, ignoring
\n
"
);
}
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
}
}
}
...
...
@@ -242,7 +242,7 @@ static BOOL CRYPT_SerializeContextsToReg(HKEY key,
ret
=
TRUE
;
}
while
(
ret
&&
context
!=
NULL
);
if
(
context
)
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
return
ret
;
}
...
...
dlls/crypt32/serialize.c
View file @
c72570ce
...
...
@@ -409,7 +409,7 @@ const void *CRYPT_ReadSerializedElement(const BYTE *pbElement, DWORD cbElement,
}
else
{
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
context
=
NULL
;
}
}
...
...
@@ -461,7 +461,7 @@ static BOOL CRYPT_ReadSerializedStore(void *handle,
propHdr
.
propID
==
CERT_CTL_PROP_ID
))
{
/* We have a new context, so free the existing one */
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
}
if
(
propHdr
.
cb
>
bufSize
)
{
...
...
@@ -522,7 +522,7 @@ static BOOL CRYPT_ReadSerializedStore(void *handle,
if
(
contextInterface
&&
context
)
{
/* Free the last context added */
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
}
CryptMemFree
(
buf
);
ret
=
TRUE
;
...
...
@@ -638,7 +638,7 @@ static BOOL CRYPT_SerializeContextsToStream(SerializedOutputFunc output,
ret
=
TRUE
;
}
while
(
ret
&&
context
!=
NULL
);
if
(
context
)
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
return
ret
;
}
...
...
@@ -996,7 +996,7 @@ BOOL WINAPI CertAddSerializedElementToStore(HCERTSTORE hCertStore,
*
pdwContentType
=
type
;
ret
=
contextInterface
->
addContextToStore
(
hCertStore
,
context
,
dwAddDisposition
,
ppvContext
);
contextInterface
->
free
(
context
);
Context_Release
(
context_from_ptr
(
context
)
);
}
else
ret
=
FALSE
;
...
...
dlls/crypt32/store.c
View file @
c72570ce
...
...
@@ -50,7 +50,6 @@ static const WINE_CONTEXT_INTERFACE gCertInterface = {
(
GetContextPropertyFunc
)
CertGetCertificateContextProperty
,
(
SetContextPropertyFunc
)
CertSetCertificateContextProperty
,
(
SerializeElementFunc
)
CertSerializeCertificateStoreElement
,
(
FreeContextFunc
)
CertFreeCertificateContext
,
(
DeleteContextFunc
)
CertDeleteCertificateFromStore
,
};
const
WINE_CONTEXT_INTERFACE
*
pCertInterface
=
&
gCertInterface
;
...
...
@@ -64,7 +63,6 @@ static const WINE_CONTEXT_INTERFACE gCRLInterface = {
(
GetContextPropertyFunc
)
CertGetCRLContextProperty
,
(
SetContextPropertyFunc
)
CertSetCRLContextProperty
,
(
SerializeElementFunc
)
CertSerializeCRLStoreElement
,
(
FreeContextFunc
)
CertFreeCRLContext
,
(
DeleteContextFunc
)
CertDeleteCRLFromStore
,
};
const
WINE_CONTEXT_INTERFACE
*
pCRLInterface
=
&
gCRLInterface
;
...
...
@@ -78,7 +76,6 @@ static const WINE_CONTEXT_INTERFACE gCTLInterface = {
(
GetContextPropertyFunc
)
CertGetCTLContextProperty
,
(
SetContextPropertyFunc
)
CertSetCTLContextProperty
,
(
SerializeElementFunc
)
CertSerializeCTLStoreElement
,
(
FreeContextFunc
)
CertFreeCTLContext
,
(
DeleteContextFunc
)
CertDeleteCTLFromStore
,
};
const
WINE_CONTEXT_INTERFACE
*
pCTLInterface
=
&
gCTLInterface
;
...
...
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