--- qemu/hw/9pfs/virtio-9p-xattr.c 2018/04/24 19:02:21 1.1 +++ qemu/hw/9pfs/virtio-9p-xattr.c 2018/04/24 19:30:32 1.1.1.2 @@ -79,7 +79,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, } /* Now fetch the xattr and find the actual size */ - orig_value = qemu_malloc(xattr_len); + orig_value = g_malloc(xattr_len); xattr_len = llistxattr(rpath(ctx, path, buffer), orig_value, xattr_len); /* store the orig pointer */ @@ -111,7 +111,7 @@ next_entry: } err_out: - qemu_free(orig_value_start); + g_free(orig_value_start); return size; }