mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: Use glib memory functions in virErrorCopyNew
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4b53ce9fa7
commit
fe0d57e160
@ -223,14 +223,8 @@ virCopyError(virErrorPtr from,
|
||||
virErrorPtr
|
||||
virErrorCopyNew(virErrorPtr err)
|
||||
{
|
||||
virErrorPtr ret;
|
||||
|
||||
if (VIR_ALLOC_QUIET(ret) < 0)
|
||||
return NULL;
|
||||
|
||||
if (virCopyError(err, ret) < 0)
|
||||
VIR_FREE(ret);
|
||||
|
||||
virErrorPtr ret = g_new0(virError, 1);
|
||||
virCopyError(err, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user