Revision 7267c094 usb-redir.c

b/usb-redir.c
234 234

  
235 235
static AsyncURB *async_alloc(USBRedirDevice *dev, USBPacket *p)
236 236
{
237
    AsyncURB *aurb = (AsyncURB *) qemu_mallocz(sizeof(AsyncURB));
237
    AsyncURB *aurb = (AsyncURB *) g_malloc0(sizeof(AsyncURB));
238 238
    aurb->dev = dev;
239 239
    aurb->packet = p;
240 240
    aurb->packet_id = dev->packet_id;
......
247 247
static void async_free(USBRedirDevice *dev, AsyncURB *aurb)
248 248
{
249 249
    QTAILQ_REMOVE(&dev->asyncq, aurb, next);
250
    qemu_free(aurb);
250
    g_free(aurb);
251 251
}
252 252

  
253 253
static AsyncURB *async_find(USBRedirDevice *dev, uint32_t packet_id)
......
286 286
static struct buf_packet *bufp_alloc(USBRedirDevice *dev,
287 287
    uint8_t *data, int len, int status, uint8_t ep)
288 288
{
289
    struct buf_packet *bufp = qemu_malloc(sizeof(struct buf_packet));
289
    struct buf_packet *bufp = g_malloc(sizeof(struct buf_packet));
290 290
    bufp->data   = data;
291 291
    bufp->len    = len;
292 292
    bufp->status = status;
......
299 299
{
300 300
    QTAILQ_REMOVE(&dev->endpoint[EP2I(ep)].bufpq, bufp, next);
301 301
    free(bufp->data);
302
    qemu_free(bufp);
302
    g_free(bufp);
303 303
}
304 304

  
305 305
static void usbredir_free_bufpq(USBRedirDevice *dev, uint8_t ep)

Also available in: Unified diff