On 09/04/2011 04:48 PM, Alex Jia wrote:
* src/rpc/virnettlscontext.c: fix memory leak on virNetTLSContextValidCertificate. * Detected in valgrind run:
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index e901b63..e6123f9 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -1050,6 +1050,7 @@ static int virNetTLSContextValidCertificate(virNetTLSContextPtr ctxt, goto authdeny; } } + gnutls_x509_crt_deinit(cert); }
ACK and pushed. This leak could kill a long-running libvirtd with lots of TLS clients repeatedly connecting, and the cleanup is similar to the cleanup done on failure paths.
-- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list