[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Matt Caswell matt at openssl.org
Mon Mar 12 19:55:30 UTC 2018


The branch OpenSSL_1_0_2-stable has been updated
       via  e56585e3e950e98d7014476bea8bfe71b3ff0a1f (commit)
      from  c46343fe662df971755df6cf66c50e531b032745 (commit)


- Log -----------------------------------------------------------------
commit e56585e3e950e98d7014476bea8bfe71b3ff0a1f
Author: Matt Caswell <matt at openssl.org>
Date:   Mon Mar 12 15:24:29 2018 +0000

    Free the correct type in OBJ_add_object()
    
    We should be using ASN1_OBJECT_free() not OPENSSL_free().
    
    Fixes #5568
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5599)

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

Summary of changes:
 crypto/objects/obj_dat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index c43d86e..315afa9 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -305,9 +305,8 @@ int OBJ_add_object(const ASN1_OBJECT *obj)
     for (i = ADDED_DATA; i <= ADDED_NID; i++)
         if (ao[i] != NULL)
             OPENSSL_free(ao[i]);
-    if (o != NULL)
-        OPENSSL_free(o);
-    return (NID_undef);
+    ASN1_OBJECT_free(o);
+    return NID_undef;
 }
 
 ASN1_OBJECT *OBJ_nid2obj(int n)


More information about the openssl-commits mailing list