Revision 7267c094 qapi/qmp-input-visitor.c

b/qapi/qmp-input-visitor.c
99 99
    }
100 100

  
101 101
    if (obj) {
102
        *obj = qemu_mallocz(size);
102
        *obj = g_malloc0(size);
103 103
    }
104 104
}
105 105

  
......
135 135
        return NULL;
136 136
    }
137 137

  
138
    entry = qemu_mallocz(sizeof(*entry));
138
    entry = g_malloc0(sizeof(*entry));
139 139
    if (*list) {
140 140
        so->entry = qlist_next(so->entry);
141 141
        if (so->entry == NULL) {
142
            qemu_free(entry);
142
            g_free(entry);
143 143
            return NULL;
144 144
        }
145 145
        (*list)->next = entry;
......
199 199
        return;
200 200
    }
201 201

  
202
    *obj = qemu_strdup(qstring_get_str(qobject_to_qstring(qobj)));
202
    *obj = g_strdup(qstring_get_str(qobject_to_qstring(qobj)));
203 203
}
204 204

  
205 205
static void qmp_input_type_number(Visitor *v, double *obj, const char *name,
......
272 272
void qmp_input_visitor_cleanup(QmpInputVisitor *v)
273 273
{
274 274
    qobject_decref(v->obj);
275
    qemu_free(v);
275
    g_free(v);
276 276
}
277 277

  
278 278
QmpInputVisitor *qmp_input_visitor_new(QObject *obj)
279 279
{
280 280
    QmpInputVisitor *v;
281 281

  
282
    v = qemu_mallocz(sizeof(*v));
282
    v = g_malloc0(sizeof(*v));
283 283

  
284 284
    v->visitor.start_struct = qmp_input_start_struct;
285 285
    v->visitor.end_struct = qmp_input_end_struct;

Also available in: Unified diff