提交 a771351a 编写于 作者: D Daniel P. Berrangé

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: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 a9fa62f3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册