< prev index next >

src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_mutex.c

Print this page
rev 16167 : 8170525: Fix minor issues in AWT/ECC/PKCS11 coding
Reviewed-by: vinnie, clanger, prr, ssadetsky

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
  *
  * Redistribution and use in  source and binary forms, with or without

@@ -93,10 +93,12 @@
     ckpInitArgs = (CK_C_INITIALIZE_ARGS_PTR) malloc(sizeof(CK_C_INITIALIZE_ARGS));
     if (ckpInitArgs == NULL) {
         throwOutOfMemoryError(env, 0);
         return NULL_PTR;
     }
+    ckpInitArgs->flags = (CK_FLAGS)0;
+    ckpInitArgs->pReserved = (CK_VOID_PTR)NULL;
 
     /* Set the mutex functions that will call the Java mutex functions, but
      * only set it, if the field is not null.
      */
     jInitArgsClass = (*env)->FindClass(env, CLASS_C_INITIALIZE_ARGS);
< prev index next >