[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Tue Jul 26 20:06:53 UTC 2016


The branch master has been updated
       via  e125c12f5718cf589b3469aa40a54421a2536bd2 (commit)
      from  abdb0c7b4ec73d6e94d4d8a0d6ee027e3b8db428 (commit)


- Log -----------------------------------------------------------------
commit e125c12f5718cf589b3469aa40a54421a2536bd2
Author: David Benjamin <davidben at google.com>
Date:   Tue Jul 26 11:36:23 2016 -0400

    Use sk_CONF_VALUE_pop_free in do_ext_nconf error path.
    
    8605abf13523579ecab8b1f2a4bcb8354d94af79 fixed the nval leak, but it
    used free instead of pop_free. nval owns its contents, so it should be
    freed with pop_free. See the pop_free call a few lines down.
    
    This is a no-op as, in this codepath, we must have nval == NULL or
    sk_CONF_VALUE_num(nval) == 0. In those cases, free and pop_free are
    identical. However, variables should be freed consistently.
    
    Reviewed-by: Kurt Roeckx <kurt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1351)

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

Summary of changes:
 crypto/x509v3/v3_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c
index 1bed5f3..f625ff5 100644
--- a/crypto/x509v3/v3_conf.c
+++ b/crypto/x509v3/v3_conf.c
@@ -94,7 +94,7 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
             ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=",
                                value);
             if (*value != '@')
-                sk_CONF_VALUE_free(nval);
+                sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
             return NULL;
         }
         ext_struc = method->v2i(method, ctx, nval);


More information about the openssl-commits mailing list