summaryrefslogtreecommitdiff
path: root/usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c')
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c
index fb28932fd0..8ba97d55ea 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softSSL.c
@@ -21,6 +21,7 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2018, Joyent, Inc.
*/
#include <fcntl.h>
@@ -925,8 +926,7 @@ soft_ssl_key_and_mac_derive(soft_session_t *sp, CK_MECHANISM_PTR mech,
if (new_tmpl_allocated)
free(new_tmpl);
- if (export_keys != NULL)
- free(export_keys);
+ freezero(export_keys, 2 * MD5_HASH_SIZE);
return (rv);
@@ -955,8 +955,7 @@ out_err:
if (new_tmpl_allocated)
free(new_tmpl);
- if (export_keys != NULL)
- free(export_keys);
+ freezero(export_keys, 2 * MD5_HASH_SIZE);
return (rv);
}