mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
src: don't use VIR_FREE on an object allocation
Memory allocated using g_object_new must never be released using VIR_FREE/g_free because g_object_new uses a special allocation strategy internally. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
a9fa62f327
commit
a771351ae4
@ -752,10 +752,7 @@ static virNetTLSContextPtr virNetTLSContextNew(const char *cacert,
|
||||
error:
|
||||
if (isServer)
|
||||
gnutls_dh_params_deinit(ctxt->dhParams);
|
||||
if (ctxt->x509cred)
|
||||
gnutls_certificate_free_credentials(ctxt->x509cred);
|
||||
VIR_FREE(ctxt->priority);
|
||||
VIR_FREE(ctxt);
|
||||
virObjectUnref(ctxt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user