diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 08:37:17 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 08:37:17 +0000 |
commit | 2137b4cca9af2ca22b527ef9f3835c532511453d (patch) | |
tree | b758c587161d84c6c2b535f2fdedc48039282170 /vnc.c | |
parent | bf6bca527c11dff117990acdeb8cb425e985788a (diff) |
Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnc.c')
-rw-r--r-- | vnc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -291,8 +291,8 @@ static void vnc_dpy_resize(DisplayState *ds, int w, int h) int size_changed; VncState *vs = ds->opaque; - ds->data = realloc(ds->data, w * h * vs->depth); - vs->old_data = realloc(vs->old_data, w * h * vs->depth); + ds->data = qemu_realloc(ds->data, w * h * vs->depth); + vs->old_data = qemu_realloc(vs->old_data, w * h * vs->depth); if (ds->data == NULL || vs->old_data == NULL) { fprintf(stderr, "vnc: memory allocation failed\n"); @@ -611,7 +611,7 @@ static void buffer_reserve(Buffer *buffer, size_t len) { if ((buffer->capacity - buffer->offset) < len) { buffer->capacity += (len + 1024); - buffer->buffer = realloc(buffer->buffer, buffer->capacity); + buffer->buffer = qemu_realloc(buffer->buffer, buffer->capacity); if (buffer->buffer == NULL) { fprintf(stderr, "vnc: out of memory\n"); exit(1); |