summaryrefslogtreecommitdiff
path: root/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/opensc/patches/patch-src_pkcs11_pkcs11-global.c')
-rw-r--r--security/opensc/patches/patch-src_pkcs11_pkcs11-global.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c b/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
index 3b1ae8c36d2..5150d8419ac 100644
--- a/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
+++ b/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
@@ -1,17 +1,17 @@
-$NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.3 2014/03/14 20:49:56 gdt Exp $
+$NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.4 2015/09/07 19:59:42 gdt Exp $
Use correct size for malloc.
Not yet reported upstream.
---- src/pkcs11/pkcs11-global.c.orig 2012-12-04 14:43:40.000000000 +0000
+--- src/pkcs11/pkcs11-global.c.orig 2015-05-16 20:30:24.000000000 +0000
+++ src/pkcs11/pkcs11-global.c
-@@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
+@@ -46,7 +46,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
#include <pthread.h>
CK_RV mutex_create(void **mutex)
{
-- pthread_mutex_t *m = malloc(sizeof(*mutex));
-+ pthread_mutex_t *m = malloc(sizeof(*m));
+- pthread_mutex_t *m = calloc(1, sizeof(*mutex));
++ pthread_mutex_t *m = calloc(1, sizeof(*m));
if (m == NULL)
return CKR_GENERAL_ERROR;;
pthread_mutex_init(m, NULL);