]> git.proxmox.com Git - qemu.git/blobdiff - qerror.c
Use glib memory allocation and free functions
[qemu.git] / qerror.c
index 69c1bc9af746aaef64491f33b291540c7aa40c7d..3d64b80b24a6363006eda8d410bb7e8e5f7e2485 100644 (file)
--- a/qerror.c
+++ b/qerror.c
@@ -242,7 +242,7 @@ QError *qerror_new(void)
 {
     QError *qerr;
 
-    qerr = qemu_mallocz(sizeof(*qerr));
+    qerr = g_malloc0(sizeof(*qerr));
     QOBJECT_INIT(qerr, &qerror_type);
 
     return qerr;
@@ -501,5 +501,5 @@ static void qerror_destroy_obj(QObject *obj)
     qerr = qobject_to_qerror(obj);
 
     QDECREF(qerr->error);
-    qemu_free(qerr);
+    g_free(qerr);
 }