Jacek Caban : crypt32: Moved ContextList freeing to store. c and get rid of ContextList.
Alexandre Julliard
julliard at winehq.org
Thu Oct 17 13:51:50 CDT 2013
Module: wine
Branch: master
Commit: fa37b63517563460a10ac863ac9526106b939bc4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa37b63517563460a10ac863ac9526106b939bc4
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Oct 17 11:10:18 2013 +0200
crypt32: Moved ContextList freeing to store.c and get rid of ContextList.
---
dlls/crypt32/context.c | 12 ------------
dlls/crypt32/crypt32_private.h | 7 -------
dlls/crypt32/store.c | 18 +++++++++++++++---
3 files changed, 15 insertions(+), 22 deletions(-)
diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c
index 82b1021..4809eea 100644
--- a/dlls/crypt32/context.c
+++ b/dlls/crypt32/context.c
@@ -109,15 +109,3 @@ void Context_CopyProperties(const void *to, const void *from)
assert(toProperties && fromProperties);
ContextPropertyList_Copy(toProperties, fromProperties);
}
-
-void ContextList_Free(ContextList *list)
-{
- context_t *context, *next;
-
- LIST_FOR_EACH_ENTRY_SAFE(context, next, list, context_t, u.entry)
- {
- TRACE("removing %p\n", context);
- list_remove(&context->u.entry);
- Context_Release(context);
- }
-}
diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h
index dc66ebf..dbb9ee5 100644
--- a/dlls/crypt32/crypt32_private.h
+++ b/dlls/crypt32/crypt32_private.h
@@ -433,13 +433,6 @@ void ContextPropertyList_Copy(CONTEXT_PROPERTY_LIST *to,
void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST *list) DECLSPEC_HIDDEN;
-/**
- * Context list functions. A context list is a simple list of link contexts.
- */
-typedef struct list ContextList;
-
-void ContextList_Free(ContextList *list) DECLSPEC_HIDDEN;
-
extern WINECRYPT_CERTSTORE empty_store;
void init_empty_store(void) DECLSPEC_HIDDEN;
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 76ba944..07613ec 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -215,6 +215,18 @@ static BOOL MemStore_deleteContext(WINE_MEMSTORE *store, context_t *context)
return TRUE;
}
+static void free_contexts(struct list *list)
+{
+ context_t *context, *next;
+
+ LIST_FOR_EACH_ENTRY_SAFE(context, next, list, context_t, u.entry)
+ {
+ TRACE("freeing %p\n", context);
+ list_remove(&context->u.entry);
+ Context_Release(context);
+ }
+}
+
static BOOL MemStore_addCert(WINECRYPT_CERTSTORE *store, context_t *cert,
context_t *toReplace, context_t **ppStoreContext, BOOL use_link)
{
@@ -317,9 +329,9 @@ static DWORD MemStore_release(WINECRYPT_CERTSTORE *cert_store, DWORD flags)
if(ref)
return (flags & CERT_CLOSE_STORE_CHECK_FLAG) ? CRYPT_E_PENDING_CLOSE : ERROR_SUCCESS;
- ContextList_Free(&store->certs);
- ContextList_Free(&store->crls);
- ContextList_Free(&store->ctls);
+ free_contexts(&store->certs);
+ free_contexts(&store->crls);
+ free_contexts(&store->ctls);
store->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&store->cs);
CRYPT_FreeStore(&store->hdr);
More information about the wine-cvs
mailing list