numa: Avoid qerror_report_err() outside QMP command handlers
authorMarkus Armbruster <armbru@redhat.com>
Tue, 10 Feb 2015 14:06:23 +0000 (15:06 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 18 Feb 2015 09:51:37 +0000 (10:51 +0100)
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.  Replace by error_report_err() in initial startup helper
numa_init_func() and board setup helper
memory_region_allocate_system_memory().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
numa.c

diff --git a/numa.c b/numa.c
index afd28666b36934b9960d5a42240b1dddf9f05c29..f8fc3778cd4d2e703ab3781eeffe9f03e1986b25 100644 (file)
--- a/numa.c
+++ b/numa.c
@@ -146,8 +146,7 @@ int numa_init_func(QemuOpts *opts, void *opaque)
     return 0;
 
 error:
-    qerror_report_err(err);
-    error_free(err);
+    error_report_err(err);
 
     if (object) {
         QapiDeallocVisitor *dv = qapi_dealloc_visitor_new();
@@ -262,8 +261,7 @@ static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner,
          * regular RAM allocation.
          */
         if (err) {
-            qerror_report_err(err);
-            error_free(err);
+            error_report_err(err);
             memory_region_init_ram(mr, owner, name, ram_size, &error_abort);
         }
 #else
@@ -298,7 +296,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
         }
         MemoryRegion *seg = host_memory_backend_get_memory(backend, &local_err);
         if (local_err) {
-            qerror_report_err(local_err);
+            error_report_err(local_err);
             exit(1);
         }