Revision 2137b4cc vnc.c

b/vnc.c
291 291
    int size_changed;
292 292
    VncState *vs = ds->opaque;
293 293

  
294
    ds->data = realloc(ds->data, w * h * vs->depth);
295
    vs->old_data = realloc(vs->old_data, w * h * vs->depth);
294
    ds->data = qemu_realloc(ds->data, w * h * vs->depth);
295
    vs->old_data = qemu_realloc(vs->old_data, w * h * vs->depth);
296 296

  
297 297
    if (ds->data == NULL || vs->old_data == NULL) {
298 298
	fprintf(stderr, "vnc: memory allocation failed\n");
......
611 611
{
612 612
    if ((buffer->capacity - buffer->offset) < len) {
613 613
	buffer->capacity += (len + 1024);
614
	buffer->buffer = realloc(buffer->buffer, buffer->capacity);
614
	buffer->buffer = qemu_realloc(buffer->buffer, buffer->capacity);
615 615
	if (buffer->buffer == NULL) {
616 616
	    fprintf(stderr, "vnc: out of memory\n");
617 617
	    exit(1);

Also available in: Unified diff