From: Carl Hetherington Date: Mon, 8 Jul 2013 19:57:04 +0000 (+0100) Subject: Fix incorrect free and leak. X-Git-Tag: v0.59~1 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=6f4d2af753813849c5cf0e9e568edad667b8b77a;p=libdcp.git Fix incorrect free and leak. --- diff --git a/src/certificates.cc b/src/certificates.cc index 085e4622..3566fba0 100644 --- a/src/certificates.cc +++ b/src/certificates.cc @@ -97,10 +97,10 @@ Certificate::issuer () const string Certificate::asn_to_utf8 (ASN1_STRING* s) { - unsigned char* buf = new unsigned char[256]; + unsigned char* buf = 0; ASN1_STRING_to_UTF8 (&buf, s); string const u (reinterpret_cast (buf)); - delete[] buf; + OPENSSL_free (buf); return u; }