diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-08 20:57:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-08 20:57:04 +0100 |
| commit | 6f4d2af753813849c5cf0e9e568edad667b8b77a (patch) | |
| tree | 0f09ff561eacf02cd9e0f6f4c2af6766b1a6227b /src | |
| parent | 9161e5cf93d0356dc809d7262280dfc7fd862d33 (diff) | |
Fix incorrect free and leak.
Diffstat (limited to 'src')
| -rw-r--r-- | src/certificates.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<char *> (buf)); - delete[] buf; + OPENSSL_free (buf); return u; } |
