Revision 7267c094 ui/spice-display.c

b/ui/spice-display.c
144 144
           ssd->dirty.left, ssd->dirty.right,
145 145
           ssd->dirty.top, ssd->dirty.bottom);
146 146

  
147
    update   = qemu_mallocz(sizeof(*update));
147
    update   = g_malloc0(sizeof(*update));
148 148
    drawable = &update->drawable;
149 149
    image    = &update->image;
150 150
    cmd      = &update->ext.cmd;
151 151

  
152 152
    bw       = ssd->dirty.right - ssd->dirty.left;
153 153
    bh       = ssd->dirty.bottom - ssd->dirty.top;
154
    update->bitmap = qemu_malloc(bw * bh * 4);
154
    update->bitmap = g_malloc(bw * bh * 4);
155 155

  
156 156
    drawable->bbox            = ssd->dirty;
157 157
    drawable->clip.type       = SPICE_CLIP_TYPE_NONE;
......
208 208
 * Called from spice server thread context (via interface_release_ressource)
209 209
 * We do *not* hold the global qemu mutex here, so extra care is needed
210 210
 * when calling qemu functions.  Qemu interfaces used:
211
 *    - qemu_free (underlying glibc free is re-entrant).
211
 *    - g_free (underlying glibc free is re-entrant).
212 212
 */
213 213
void qemu_spice_destroy_update(SimpleSpiceDisplay *sdpy, SimpleSpiceUpdate *update)
214 214
{
215
    qemu_free(update->bitmap);
216
    qemu_free(update);
215
    g_free(update->bitmap);
216
    g_free(update);
217 217
}
218 218

  
219 219
void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd)
......
274 274
    ssd->mouse_x = -1;
275 275
    ssd->mouse_y = -1;
276 276
    ssd->bufsize = (16 * 1024 * 1024);
277
    ssd->buf = qemu_malloc(ssd->bufsize);
277
    ssd->buf = g_malloc(ssd->bufsize);
278 278
}
279 279

  
280 280
/* display listener callbacks */

Also available in: Unified diff