Signed-off-by: Tim Wiederhake <twied...@redhat.com>
---
 src/util/virerror.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/virerror.c b/src/util/virerror.c
index 99a0855b51..df4205043a 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -405,8 +405,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;
-- 
2.26.2

Reply via email to