mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
ocsp: fix leak
This commit is contained in:
1 parent
5527869d13
commit
c6da80573e
1 file changed
+6
-4
+6
-4
@@ -1264,10 +1264,12 @@ Blob
|
||||
OcspResponse::pack() const
|
||||
{
|
||||
gnutls_datum_t dat;
|
||||
int ret = gnutls_ocsp_resp_export(response, &dat);
|
||||
if (ret < 0)
|
||||
throw CryptoException(gnutls_strerror(ret));
|
||||
return {dat.data, dat.data + dat.size};
|
||||
int err = gnutls_ocsp_resp_export(response, &dat);
|
||||
if (err < 0)
|
||||
throw CryptoException(gnutls_strerror(err));
|
||||
Blob ret {dat.data, dat.data + dat.size};
|
||||
gnutls_free(dat.data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string
|
||||
|
||||
Reference in new issue
Block a user