From 44741f98424ed014b15e9fa75544019440477522 Mon Sep 17 00:00:00 2001
From: miod <>
Date: Sun, 5 Oct 2014 18:27:58 +0000
Subject: Memory leak upon error in set_dist_point_name(). ok guenther@

---
 src/lib/libcrypto/x509v3/v3_crld.c         | 3 ++-
 src/lib/libssl/src/crypto/x509v3/v3_crld.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c
index aac0c7706e..9586401da6 100644
--- a/src/lib/libcrypto/x509v3/v3_crld.c
+++ b/src/lib/libcrypto/x509v3/v3_crld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_crld.c,v 1.12 2014/07/11 08:44:49 jsing Exp $ */
+/* $OpenBSD: v3_crld.c,v 1.13 2014/10/05 18:27:58 miod Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 1999.
  */
@@ -134,6 +134,7 @@ set_dist_point_name(DIST_POINT_NAME **pdp, X509V3_CTX *ctx, CONF_VALUE *cnf)
 		if (!dnsect) {
 			X509V3err(X509V3_F_SET_DIST_POINT_NAME,
 			    X509V3_R_SECTION_NOT_FOUND);
+			X509_NAME_free(nm);
 			return -1;
 		}
 		ret = X509V3_NAME_from_section(nm, dnsect, MBSTRING_ASC);
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_crld.c b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
index aac0c7706e..9586401da6 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_crld.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_crld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_crld.c,v 1.12 2014/07/11 08:44:49 jsing Exp $ */
+/* $OpenBSD: v3_crld.c,v 1.13 2014/10/05 18:27:58 miod Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 1999.
  */
@@ -134,6 +134,7 @@ set_dist_point_name(DIST_POINT_NAME **pdp, X509V3_CTX *ctx, CONF_VALUE *cnf)
 		if (!dnsect) {
 			X509V3err(X509V3_F_SET_DIST_POINT_NAME,
 			    X509V3_R_SECTION_NOT_FOUND);
+			X509_NAME_free(nm);
 			return -1;
 		}
 		ret = X509V3_NAME_from_section(nm, dnsect, MBSTRING_ASC);
-- 
cgit v1.2.3-55-g6feb