[gnome-keyring] [rpc] Fix assertion on exit due to pointer not being cleared.



commit 29beeda5cf021feebbb6d3c28e874aef3ff50211
Author: Stef Walter <stef memberwebs com>
Date:   Wed Apr 21 15:34:04 2010 +0000

    [rpc] Fix assertion on exit due to pointer not being cleared.

 pkcs11/rpc-layer/gck-rpc-dispatch.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/pkcs11/rpc-layer/gck-rpc-dispatch.c b/pkcs11/rpc-layer/gck-rpc-dispatch.c
index f2961d0..e70dd8e 100644
--- a/pkcs11/rpc-layer/gck-rpc-dispatch.c
+++ b/pkcs11/rpc-layer/gck-rpc-dispatch.c
@@ -2265,8 +2265,11 @@ gck_rpc_layer_uninitialize (void)
 		pkcs11_socket_path = NULL;
 	}
 
+	ds = pkcs11_dispatchers;
+	pkcs11_dispatchers = NULL;
+
 	/* Stop all of the dispatch threads */
-	for (ds = pkcs11_dispatchers; ds; ds = next) {
+	for (; ds; ds = next) {
 		next = ds->next;
 
 		/* Forcibly shutdown the connection */
@@ -2351,8 +2354,11 @@ gck_rpc_layer_shutdown (void)
 		pkcs11_socket_path = NULL;
 	}
 
+	ds = pkcs11_dispatchers;
+	pkcs11_dispatchers = NULL;
+
 	/* Stop all of the dispatch threads */
-	for (ds = pkcs11_dispatchers; ds; ds = next) {
+	for (; ds; ds = next) {
 		next = ds->next;
 		
 		/* Forcibly shutdown the connection */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]