mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
util: Use glib memory functions in virSaveLastError
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
18216abcfe
commit
38f7fdfdb4
@ -404,8 +404,7 @@ virSaveLastError(void)
|
||||
virErrorPtr to;
|
||||
int saved_errno = errno;
|
||||
|
||||
if (VIR_ALLOC_QUIET(to) < 0)
|
||||
return NULL;
|
||||
to = g_new0(virError, 1);
|
||||
|
||||
virCopyLastError(to);
|
||||
errno = saved_errno;
|
||||
|
Loading…
x
Reference in New Issue
Block a user