aboutsummaryrefslogtreecommitdiff
path: root/pflib.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 /pflib.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 'pflib.c')
-rw-r--r--pflib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pflib.c b/pflib.c
index 1154d0c9a3..64cb2b3dda 100644
--- a/pflib.c
+++ b/pflib.c
@@ -145,7 +145,7 @@ static void convert_generic(QemuPfConv *conv, void *dst, void *src, uint32_t cnt
{
if (conv->conv_cnt < cnt) {
conv->conv_cnt = cnt;
- conv->conv_buf = qemu_realloc(conv->conv_buf, sizeof(QemuPixel) * conv->conv_cnt);
+ conv->conv_buf = g_realloc(conv->conv_buf, sizeof(QemuPixel) * conv->conv_cnt);
}
conv->conv_from(&conv->src, conv->conv_buf, src, cnt);
conv->conv_to(&conv->dst, dst, conv->conv_buf, cnt);
@@ -156,7 +156,7 @@ static void convert_generic(QemuPfConv *conv, void *dst, void *src, uint32_t cnt
QemuPfConv *qemu_pf_conv_get(PixelFormat *dst, PixelFormat *src)
{
- QemuPfConv *conv = qemu_mallocz(sizeof(QemuPfConv));
+ QemuPfConv *conv = g_malloc0(sizeof(QemuPfConv));
conv->src = *src;
conv->dst = *dst;
@@ -195,7 +195,7 @@ QemuPfConv *qemu_pf_conv_get(PixelFormat *dst, PixelFormat *src)
return conv;
err:
- qemu_free(conv);
+ g_free(conv);
return NULL;
}
@@ -207,7 +207,7 @@ void qemu_pf_conv_run(QemuPfConv *conv, void *dst, void *src, uint32_t cnt)
void qemu_pf_conv_put(QemuPfConv *conv)
{
if (conv) {
- qemu_free(conv->conv_buf);
- qemu_free(conv);
+ g_free(conv->conv_buf);
+ g_free(conv);
}
}