Memory leak in tor_cert_parse. CID gi1301381

This commit is contained in:
Nick Mathewson 2015-05-28 13:09:00 -04:00
parent 3262f3c3f6
commit 3df6f8591d

View File

@ -145,10 +145,12 @@ tor_cert_parse(const uint8_t *encoded, const size_t len)
} }
} }
return cert; goto done;
err: err:
ed25519_cert_free(parsed);
tor_cert_free(cert); tor_cert_free(cert);
cert = NULL;
done:
ed25519_cert_free(parsed);
return NULL; return NULL;
} }