]> git.0d.be Git - empathy.git/blobdiff - tests/mock-pkcs11.c
libempathy-gtk: fix uninitialized variable
[empathy.git] / tests / mock-pkcs11.c
index 572221acc6f4fc8776866fb5e927caf2595be70d..a2ee648bbc40caab87dd06867ba9b5f50f61b5fd 100644 (file)
@@ -14,8 +14,7 @@
  *
  * You should have received a copy of the GNU Lesser General
  * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 #include "config.h"
@@ -70,7 +69,7 @@ typedef struct {
 static void
 free_session (gpointer data)
 {
-  Session *sess = (Session*)data;
+  Session *sess = (Session *) data;
   g_list_free (sess->matches);
   g_free (sess);
 }
@@ -119,7 +118,7 @@ mock_C_Initialize (CK_VOID_PTR init_args)
   args = (CK_C_INITIALIZE_ARGS_PTR)init_args;
   if (args)
     {
-      g_return_val_if_fail(
+      g_return_val_if_fail (
           (args->CreateMutex == NULL && args->DestroyMutex == NULL &&
            args->LockMutex == NULL && args->UnlockMutex == NULL) ||
           (args->CreateMutex != NULL && args->DestroyMutex != NULL &&
@@ -147,13 +146,13 @@ mock_C_Finalize (CK_VOID_PTR reserved)
 
   initialized = FALSE;
 
-  g_hash_table_destroy (the_certificates);
+  g_hash_table_unref (the_certificates);
   the_certificates = NULL;
 
-  g_hash_table_destroy (the_assertions);
+  g_hash_table_unref (the_assertions);
   the_assertions = NULL;
 
-  g_hash_table_destroy (the_sessions);
+  g_hash_table_unref (the_sessions);
   the_sessions = NULL;
 
   return CKR_OK;