Revision 7267c094 error.c

b/error.c
32 32
        return;
33 33
    }
34 34

  
35
    err = qemu_mallocz(sizeof(*err));
35
    err = g_malloc0(sizeof(*err));
36 36

  
37 37
    va_start(ap, fmt);
38 38
    err->obj = qobject_to_qdict(qobject_from_jsonv(fmt, &ap));
......
52 52
    if (err->msg == NULL) {
53 53
        QString *str;
54 54
        str = qerror_format(err->fmt, err->obj);
55
        err->msg = qemu_strdup(qstring_get_str(str));
55
        err->msg = g_strdup(qstring_get_str(str));
56 56
        QDECREF(str);
57 57
    }
58 58

  
......
86 86
{
87 87
    if (err) {
88 88
        QDECREF(err->obj);
89
        qemu_free(err->msg);
90
        qemu_free(err);
89
        g_free(err->msg);
90
        g_free(err);
91 91
    }
92 92
}
93 93

  
......
133 133
    if (errp == NULL) {
134 134
        return;
135 135
    }
136
    err = qemu_mallocz(sizeof(*err));
136
    err = g_malloc0(sizeof(*err));
137 137
    err->obj = qobject_to_qdict(obj);
138 138
    qobject_incref(obj);
139 139

  

Also available in: Unified diff