From ea6cba256fb4abfe8b253f5b74406f48bfe448f0 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Mar 2009 06:10:45 +0000 Subject: * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should use OPENSSL_free instead of free. a patch from Charlie Savage at [ruby-core:22858]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index 64867039f..87210700a 100644 --- a/ext/openssl/ossl_x509ext.c +++ b/ext/openssl/ossl_x509ext.c @@ -325,15 +325,15 @@ ossl_x509ext_set_value(VALUE self, VALUE data) ossl_raise(eX509ExtError, "malloc error"); memcpy(s, RSTRING_PTR(data), RSTRING_LEN(data)); if(!(asn1s = ASN1_OCTET_STRING_new())){ - free(s); + OPENSSL_free(s); ossl_raise(eX509ExtError, NULL); } if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING_LEN(data))){ - free(s); + OPENSSL_free(s); ASN1_OCTET_STRING_free(asn1s); ossl_raise(eX509ExtError, NULL); } - free(s); + OPENSSL_free(s); GetX509Ext(self, ext); X509_EXTENSION_set_data(ext, asn1s); -- cgit