Revision 7267c094 qlist.c

b/qlist.c
31 31
{
32 32
    QList *qlist;
33 33

  
34
    qlist = qemu_malloc(sizeof(*qlist));
34
    qlist = g_malloc(sizeof(*qlist));
35 35
    QTAILQ_INIT(&qlist->head);
36 36
    QOBJECT_INIT(qlist, &qlist_type);
37 37

  
......
64 64
{
65 65
    QListEntry *entry;
66 66

  
67
    entry = qemu_malloc(sizeof(*entry));
67
    entry = g_malloc(sizeof(*entry));
68 68
    entry->value = value;
69 69

  
70 70
    QTAILQ_INSERT_TAIL(&qlist->head, entry, next);
......
98 98
    QTAILQ_REMOVE(&qlist->head, entry, next);
99 99

  
100 100
    ret = entry->value;
101
    qemu_free(entry);
101
    g_free(entry);
102 102

  
103 103
    return ret;
104 104
}
......
150 150
    QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) {
151 151
        QTAILQ_REMOVE(&qlist->head, entry, next);
152 152
        qobject_decref(entry->value);
153
        qemu_free(entry);
153
        g_free(entry);
154 154
    }
155 155

  
156
    qemu_free(qlist);
156
    g_free(qlist);
157 157
}

Also available in: Unified diff