From 56e6f594bf47a0a543ff5e6d14701355fe99b098 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Fri, 2 Apr 2021 11:03:33 +0800 Subject: Revert "net: Move NetClientState.info_str to dynamic allocations" Several issues has been reported for query-netdev info series. Consider it's late in the rc, this reverts commit commit 59b5437eb732d6b103a9bc279c3482c834d1eff9. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/vhost-vdpa.c') diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 423d71770d..8c27ea0142 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -200,7 +200,7 @@ static int net_vhost_vdpa_init(NetClientState *peer, const char *device, stored->has_queues = true; stored->queues = 1; /* TODO: change when support multiqueue */ - nc->info_str = g_strdup_printf(TYPE_VHOST_VDPA); + snprintf(nc->info_str, sizeof(nc->info_str), TYPE_VHOST_VDPA); nc->queue_index = 0; s = DO_UPCAST(VhostVDPAState, nc, nc); vdpa_device_fd = qemu_open_old(vhostdev, O_RDWR); -- cgit v1.2.3