[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Tue Feb 21 19:54:32 UTC 2017


The branch master has been updated
       via  1b8f19379a521ec11ce37e12316dd3edc0acfb82 (commit)
      from  0fbaef9e64fa10446aff805791befaa2b967e322 (commit)


- Log -----------------------------------------------------------------
commit 1b8f19379a521ec11ce37e12316dd3edc0acfb82
Author: Dmitry Belyavskiy <beldmit at gmail.com>
Date:   Sat Feb 18 20:43:01 2017 +0300

    Fix memory leak in pkcs12 -export
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2676)

-----------------------------------------------------------------------

Summary of changes:
 crypto/pkcs12/p12_mutl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c
index d6b8919..899a12e 100644
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -204,6 +204,9 @@ int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
 {
     X509_ALGOR *macalg;
 
+    PKCS12_MAC_DATA_free(p12->mac);
+    p12->mac = NULL;
+
     if ((p12->mac = PKCS12_MAC_DATA_new()) == NULL)
         return PKCS12_ERROR;
     if (iter > 1) {


More information about the openssl-commits mailing list