mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
crypt32: Use Context_AddRef instead of WINE_CONTEXT_INTERFACE.
This commit is contained in:
parent
993691bef5
commit
76066d1cfe
@ -161,7 +161,7 @@ static void *CRYPT_CollectionAdvanceEnum(WINE_COLLECTIONSTORE *store,
|
|||||||
* the free(pPrev) below can cause the ref count to become negative.
|
* the free(pPrev) below can cause the ref count to become negative.
|
||||||
*/
|
*/
|
||||||
child = Context_GetLinkedContext(pPrev);
|
child = Context_GetLinkedContext(pPrev);
|
||||||
contextInterface->duplicate(child);
|
Context_AddRef(context_from_ptr(child));
|
||||||
child = contextFuncs->enumContext(storeEntry->store, child);
|
child = contextFuncs->enumContext(storeEntry->store, child);
|
||||||
contextInterface->free(pPrev);
|
contextInterface->free(pPrev);
|
||||||
pPrev = NULL;
|
pPrev = NULL;
|
||||||
|
@ -235,7 +235,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
|
|||||||
if (listNext)
|
if (listNext)
|
||||||
{
|
{
|
||||||
ret = ContextList_EntryToContext(list, listNext);
|
ret = ContextList_EntryToContext(list, listNext);
|
||||||
list->contextInterface->duplicate(ret);
|
Context_AddRef(context_from_ptr(ret));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
|
@ -217,7 +217,6 @@ typedef BOOL (WINAPI *AddContextToStoreFunc)(HCERTSTORE hCertStore,
|
|||||||
typedef BOOL (WINAPI *AddEncodedContextToStoreFunc)(HCERTSTORE hCertStore,
|
typedef BOOL (WINAPI *AddEncodedContextToStoreFunc)(HCERTSTORE hCertStore,
|
||||||
DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded,
|
DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded,
|
||||||
DWORD dwAddDisposition, const void **ppContext);
|
DWORD dwAddDisposition, const void **ppContext);
|
||||||
typedef const void *(WINAPI *DuplicateContextFunc)(const void *context);
|
|
||||||
typedef const void *(WINAPI *EnumContextsInStoreFunc)(HCERTSTORE hCertStore,
|
typedef const void *(WINAPI *EnumContextsInStoreFunc)(HCERTSTORE hCertStore,
|
||||||
const void *pPrevContext);
|
const void *pPrevContext);
|
||||||
typedef DWORD (WINAPI *EnumPropertiesFunc)(const void *context, DWORD dwPropId);
|
typedef DWORD (WINAPI *EnumPropertiesFunc)(const void *context, DWORD dwPropId);
|
||||||
@ -236,7 +235,6 @@ typedef struct _WINE_CONTEXT_INTERFACE
|
|||||||
CreateContextFunc create;
|
CreateContextFunc create;
|
||||||
AddContextToStoreFunc addContextToStore;
|
AddContextToStoreFunc addContextToStore;
|
||||||
AddEncodedContextToStoreFunc addEncodedToStore;
|
AddEncodedContextToStoreFunc addEncodedToStore;
|
||||||
DuplicateContextFunc duplicate;
|
|
||||||
EnumContextsInStoreFunc enumContextsInStore;
|
EnumContextsInStoreFunc enumContextsInStore;
|
||||||
EnumPropertiesFunc enumProps;
|
EnumPropertiesFunc enumProps;
|
||||||
GetContextPropertyFunc getProp;
|
GetContextPropertyFunc getProp;
|
||||||
|
@ -271,7 +271,10 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
|
|||||||
*phCertStore = CertDuplicateStore(
|
*phCertStore = CertDuplicateStore(
|
||||||
*(HCERTSTORE *)((const BYTE *)context + certStoreOffset));
|
*(HCERTSTORE *)((const BYTE *)context + certStoreOffset));
|
||||||
if (ppvContext)
|
if (ppvContext)
|
||||||
*ppvContext = contextInterface->duplicate(context);
|
{
|
||||||
|
*ppvContext = context;
|
||||||
|
Context_AddRef(context_from_ptr(context));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -45,7 +45,6 @@ static const WINE_CONTEXT_INTERFACE gCertInterface = {
|
|||||||
(CreateContextFunc)CertCreateCertificateContext,
|
(CreateContextFunc)CertCreateCertificateContext,
|
||||||
(AddContextToStoreFunc)CertAddCertificateContextToStore,
|
(AddContextToStoreFunc)CertAddCertificateContextToStore,
|
||||||
(AddEncodedContextToStoreFunc)CertAddEncodedCertificateToStore,
|
(AddEncodedContextToStoreFunc)CertAddEncodedCertificateToStore,
|
||||||
(DuplicateContextFunc)CertDuplicateCertificateContext,
|
|
||||||
(EnumContextsInStoreFunc)CertEnumCertificatesInStore,
|
(EnumContextsInStoreFunc)CertEnumCertificatesInStore,
|
||||||
(EnumPropertiesFunc)CertEnumCertificateContextProperties,
|
(EnumPropertiesFunc)CertEnumCertificateContextProperties,
|
||||||
(GetContextPropertyFunc)CertGetCertificateContextProperty,
|
(GetContextPropertyFunc)CertGetCertificateContextProperty,
|
||||||
@ -60,7 +59,6 @@ static const WINE_CONTEXT_INTERFACE gCRLInterface = {
|
|||||||
(CreateContextFunc)CertCreateCRLContext,
|
(CreateContextFunc)CertCreateCRLContext,
|
||||||
(AddContextToStoreFunc)CertAddCRLContextToStore,
|
(AddContextToStoreFunc)CertAddCRLContextToStore,
|
||||||
(AddEncodedContextToStoreFunc)CertAddEncodedCRLToStore,
|
(AddEncodedContextToStoreFunc)CertAddEncodedCRLToStore,
|
||||||
(DuplicateContextFunc)CertDuplicateCRLContext,
|
|
||||||
(EnumContextsInStoreFunc)CertEnumCRLsInStore,
|
(EnumContextsInStoreFunc)CertEnumCRLsInStore,
|
||||||
(EnumPropertiesFunc)CertEnumCRLContextProperties,
|
(EnumPropertiesFunc)CertEnumCRLContextProperties,
|
||||||
(GetContextPropertyFunc)CertGetCRLContextProperty,
|
(GetContextPropertyFunc)CertGetCRLContextProperty,
|
||||||
@ -75,7 +73,6 @@ static const WINE_CONTEXT_INTERFACE gCTLInterface = {
|
|||||||
(CreateContextFunc)CertCreateCTLContext,
|
(CreateContextFunc)CertCreateCTLContext,
|
||||||
(AddContextToStoreFunc)CertAddCTLContextToStore,
|
(AddContextToStoreFunc)CertAddCTLContextToStore,
|
||||||
(AddEncodedContextToStoreFunc)CertAddEncodedCTLToStore,
|
(AddEncodedContextToStoreFunc)CertAddEncodedCTLToStore,
|
||||||
(DuplicateContextFunc)CertDuplicateCTLContext,
|
|
||||||
(EnumContextsInStoreFunc)CertEnumCTLsInStore,
|
(EnumContextsInStoreFunc)CertEnumCTLsInStore,
|
||||||
(EnumPropertiesFunc)CertEnumCTLContextProperties,
|
(EnumPropertiesFunc)CertEnumCTLContextProperties,
|
||||||
(GetContextPropertyFunc)CertGetCTLContextProperty,
|
(GetContextPropertyFunc)CertGetCTLContextProperty,
|
||||||
|
Loading…
Reference in New Issue
Block a user