From 31ddb457bfe55171e657ec04d57defdf7d460370 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 3 Aug 2016 21:17:11 +0900 Subject: x509req: fix memory leaks in #set_attributes and #add_attribute X509_REQ_add1_attr() dups the X509_ATTRIBUTE given as the argument, so we don't need to duplicate beforehand. --- ext/openssl/ossl_x509req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/openssl/ossl_x509req.c') diff --git a/ext/openssl/ossl_x509req.c b/ext/openssl/ossl_x509req.c index 7a277597..11cff733 100644 --- a/ext/openssl/ossl_x509req.c +++ b/ext/openssl/ossl_x509req.c @@ -432,7 +432,7 @@ ossl_x509req_set_attributes(VALUE self, VALUE ary) X509_ATTRIBUTE_free(attr); for (i=0;i