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(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org