aboutsummaryrefslogtreecommitdiff
path: root/block/curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/curl.c')
-rw-r--r--block/curl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/curl.c b/block/curl.c
index 407f0955a3..5c157bc609 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -310,7 +310,7 @@ static int curl_open(BlockDriverState *bs, const char *filename, int flags)
static int inited = 0;
- file = qemu_strdup(filename);
+ file = g_strdup(filename);
s->readahead_size = READ_AHEAD_SIZE;
/* Parse a trailing ":readahead=#:" param, if present. */
@@ -390,7 +390,7 @@ out:
curl_easy_cleanup(state->curl);
state->curl = NULL;
out_noclean:
- qemu_free(file);
+ g_free(file);
return -EINVAL;
}
@@ -444,11 +444,11 @@ static BlockDriverAIOCB *curl_aio_readv(BlockDriverState *bs,
state->buf_off = 0;
if (state->orig_buf)
- qemu_free(state->orig_buf);
+ g_free(state->orig_buf);
state->buf_start = start;
state->buf_len = acb->end + s->readahead_size;
end = MIN(start + state->buf_len, s->len) - 1;
- state->orig_buf = qemu_malloc(state->buf_len);
+ state->orig_buf = g_malloc(state->buf_len);
state->acb[0] = acb;
snprintf(state->range, 127, "%zd-%zd", start, end);
@@ -476,7 +476,7 @@ static void curl_close(BlockDriverState *bs)
s->states[i].curl = NULL;
}
if (s->states[i].orig_buf) {
- qemu_free(s->states[i].orig_buf);
+ g_free(s->states[i].orig_buf);
s->states[i].orig_buf = NULL;
}
}