summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/openssl/ossl_x509ext.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0bf9ae2..4a06eb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 13 15:10:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should use
+ OPENSSL_free instead of free. a patch from Charlie Savage a
+ [ruby-core:22858].
+
Fri Mar 13 10:42:19 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (AC_HEADER_DIRENT): added.
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 6486703..8721070 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);