summaryrefslogtreecommitdiffstats
path: root/hw/net/xen_nic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/xen_nic.c')
-rw-r--r--hw/net/xen_nic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/net/xen_nic.c b/hw/net/xen_nic.c
index 8431808ea0..5c815b4f0c 100644
--- a/hw/net/xen_nic.c
+++ b/hw/net/xen_nic.c
@@ -296,8 +296,9 @@ static int net_init(struct XenLegacyDevice *xendev)
netdev->nic = qemu_new_nic(&net_xen_info, &netdev->conf,
"xen", NULL, netdev);
- qemu_get_queue(netdev->nic)->info_str = g_strdup_printf(
- "nic: xenbus vif macaddr=%s", netdev->mac);
+ snprintf(qemu_get_queue(netdev->nic)->info_str,
+ sizeof(qemu_get_queue(netdev->nic)->info_str),
+ "nic: xenbus vif macaddr=%s", netdev->mac);
/* fill info */
xenstore_write_be_int(&netdev->xendev, "feature-rx-copy", 1);