diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-19 21:20:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-19 21:20:56 +0100 |
| commit | 30e2f6f873002d16aeae707879ea15c1c63a4323 (patch) | |
| tree | b7d1accf1bd76a8f049252f8bd2d72114fcd5e40 /src | |
| parent | 8d6c3c9ae554430582dcb016897e87f6d04d5d78 (diff) | |
Fix bad frees if exceptions are thrown by constructors.
Diffstat (limited to 'src')
| -rw-r--r-- | src/certificates.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/certificates.cc b/src/certificates.cc index 6d9c449d..d02754f1 100644 --- a/src/certificates.cc +++ b/src/certificates.cc @@ -57,11 +57,13 @@ Certificate::Certificate (boost::filesystem::path filename) } Certificate::Certificate (string cert) + : _certificate (0) { read_string (cert); } Certificate::Certificate (Certificate const & other) + : _certificate (0) { read_string (other.certificate (true)); } @@ -93,7 +95,7 @@ Certificate::operator= (Certificate const & other) if (this == &other) { return *this; } - + X509_free (_certificate); read_string (other.certificate ()); |
