aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-06 08:37:17 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-06 08:37:17 +0000
commit2137b4cca9af2ca22b527ef9f3835c532511453d (patch)
treeb758c587161d84c6c2b535f2fdedc48039282170 /vnc.c
parentbf6bca527c11dff117990acdeb8cb425e985788a (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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnc.c b/vnc.c
index 31118ee1c9..2d17044d61 100644
--- a/vnc.c
+++ b/vnc.c
@@ -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);