Revision 7267c094 qdict.c

b/qdict.c
35 35
{
36 36
    QDict *qdict;
37 37

  
38
    qdict = qemu_mallocz(sizeof(*qdict));
38
    qdict = g_malloc0(sizeof(*qdict));
39 39
    QOBJECT_INIT(qdict, &qdict_type);
40 40

  
41 41
    return qdict;
......
75 75
{
76 76
    QDictEntry *entry;
77 77

  
78
    entry = qemu_mallocz(sizeof(*entry));
79
    entry->key = qemu_strdup(key);
78
    entry = g_malloc0(sizeof(*entry));
79
    entry->key = g_strdup(key);
80 80
    entry->value = value;
81 81

  
82 82
    return entry;
......
410 410
    assert(e->value != NULL);
411 411

  
412 412
    qobject_decref(e->value);
413
    qemu_free(e->key);
414
    qemu_free(e);
413
    g_free(e->key);
414
    g_free(e);
415 415
}
416 416

  
417 417
/**
......
452 452
        }
453 453
    }
454 454

  
455
    qemu_free(qdict);
455
    g_free(qdict);
456 456
}

Also available in: Unified diff