aboutsummaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /buffered_file.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/buffered_file.c b/buffered_file.c
index 41b42c3d5a..486af575d5 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -56,7 +56,7 @@ static void buffered_append(QEMUFileBuffered *s,
s->buffer_capacity += size + 1024;
- tmp = qemu_realloc(s->buffer, s->buffer_capacity);
+ tmp = g_realloc(s->buffer, s->buffer_capacity);
if (tmp == NULL) {
fprintf(stderr, "qemu file buffer expansion failed\n");
exit(1);
@@ -183,8 +183,8 @@ static int buffered_close(void *opaque)
qemu_del_timer(s->timer);
qemu_free_timer(s->timer);
- qemu_free(s->buffer);
- qemu_free(s);
+ g_free(s->buffer);
+ g_free(s);
return ret;
}
@@ -259,7 +259,7 @@ QEMUFile *qemu_fopen_ops_buffered(void *opaque,
{
QEMUFileBuffered *s;
- s = qemu_mallocz(sizeof(*s));
+ s = g_malloc0(sizeof(*s));
s->opaque = opaque;
s->xfer_limit = bytes_per_sec / 10;