Try to not leak memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18788 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1484,6 +1484,8 @@ hx509_crypto_destroy(hx509_crypto crypto)
|
|||||||
free(crypto->name);
|
free(crypto->name);
|
||||||
if (crypto->key.data)
|
if (crypto->key.data)
|
||||||
free(crypto->key.data);
|
free(crypto->key.data);
|
||||||
|
if (crypto->param)
|
||||||
|
free(crypto->param);
|
||||||
der_free_oid(&crypto->oid);
|
der_free_oid(&crypto->oid);
|
||||||
memset(crypto, 0, sizeof(*crypto));
|
memset(crypto, 0, sizeof(*crypto));
|
||||||
free(crypto);
|
free(crypto);
|
||||||
|
@@ -236,8 +236,8 @@ cms_create_sd(struct cms_create_sd_options *opt, int argc, char **argv)
|
|||||||
|
|
||||||
hx509_certs_free(&anchors);
|
hx509_certs_free(&anchors);
|
||||||
hx509_certs_free(&pool);
|
hx509_certs_free(&pool);
|
||||||
hx509_certs_free(&store);
|
|
||||||
hx509_cert_free(cert);
|
hx509_cert_free(cert);
|
||||||
|
hx509_certs_free(&store);
|
||||||
_hx509_unmap_file(p, sz);
|
_hx509_unmap_file(p, sz);
|
||||||
hx509_lock_free(lock);
|
hx509_lock_free(lock);
|
||||||
|
|
||||||
@@ -313,6 +313,7 @@ cms_unenvelope(struct cms_unenvelope_options *opt, int argc, char **argv)
|
|||||||
_hx509_unmap_file(p, sz);
|
_hx509_unmap_file(p, sz);
|
||||||
hx509_lock_free(lock);
|
hx509_lock_free(lock);
|
||||||
hx509_certs_free(&certs);
|
hx509_certs_free(&certs);
|
||||||
|
der_free_oid(&contentType);
|
||||||
|
|
||||||
ret = _hx509_write_file(argv[1], o.data, o.length);
|
ret = _hx509_write_file(argv[1], o.data, o.length);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Reference in New Issue
Block a user