mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
virnetserver: fix some memory leaks in virNetTLSContextReloadForServer
These leaks were introduced in commit 15d280fa97
, use g_autofree for all
cert_path pointers.
Signed-off-by: Jin Yan <jinyan12@huawei.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e2e0a4108b
commit
1b5bf7d540
@ -921,10 +921,10 @@ int virNetTLSContextReloadForServer(virNetTLSContextPtr ctxt,
|
||||
{
|
||||
gnutls_certificate_credentials_t x509credBak;
|
||||
int err;
|
||||
char *cacert = NULL;
|
||||
char *cacrl = NULL;
|
||||
char *cert = NULL;
|
||||
char *key = NULL;
|
||||
g_autofree char *cacert = NULL;
|
||||
g_autofree char *cacrl = NULL;
|
||||
g_autofree char *cert = NULL;
|
||||
g_autofree char *key = NULL;
|
||||
|
||||
x509credBak = ctxt->x509cred;
|
||||
ctxt->x509cred = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user