From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL v1 (for 2.5) 1/4] crypto: fix leak of gnutls_dh_params_t data on credential unload
Date: Wed, 18 Nov 2015 15:47:41 +0000 [thread overview]
Message-ID: <1447861664-16283-2-git-send-email-berrange@redhat.com> (raw)
In-Reply-To: <1447861664-16283-1-git-send-email-berrange@redhat.com>
The QCryptoTLSCredsX509 object was not free'ing the allocated
gnutls_dh_params_t data when unloading the credentials
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
crypto/tlscredsx509.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index dc46bc4..c5d1a0d 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -654,6 +654,10 @@ qcrypto_tls_creds_x509_unload(QCryptoTLSCredsX509 *creds)
gnutls_certificate_free_credentials(creds->data);
creds->data = NULL;
}
+ if (creds->parent_obj.dh_params) {
+ gnutls_dh_params_deinit(creds->parent_obj.dh_params);
+ creds->parent_obj.dh_params = NULL;
+ }
}
--
2.5.0
next prev parent reply other threads:[~2015-11-18 15:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 15:47 [Qemu-devel] [PULL v1 (for 2.5) 0/4] Fix misc memory leaks & bugs in crypto code Daniel P. Berrange
2015-11-18 15:47 ` Daniel P. Berrange [this message]
2015-11-18 15:47 ` [Qemu-devel] [PULL v1 (for 2.5) 2/4] crypto: fix mistaken setting of Error in success code path Daniel P. Berrange
2015-11-18 15:47 ` [Qemu-devel] [PULL v1 (for 2.5) 3/4] crypto: fix leaks in TLS x509 helper functions Daniel P. Berrange
2015-11-18 15:47 ` [Qemu-devel] [PULL v1 (for 2.5) 4/4] crypto: avoid passing NULL to access() syscall Daniel P. Berrange
2015-11-18 17:06 ` [Qemu-devel] [PULL v1 (for 2.5) 0/4] Fix misc memory leaks & bugs in crypto code Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447861664-16283-2-git-send-email-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).