diff mbox

Don't assign a static string to NICInfo::model

Message ID 1254827836-11021-3-git-send-email-markmc@redhat.com
State Superseded
Headers show

Commit Message

Mark McLoughlin Oct. 6, 2009, 11:16 a.m. UTC
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index be0776f..95868e7 100644
--- a/vl.c
+++ b/vl.c
@@ -2597,7 +2597,7 @@  static int usb_device_add(const char *devname, int is_hotplug)
 
         if (net_client_init(NULL, "nic", p) < 0)
             return -1;
-        nd_table[nic].model = "usb";
+        nd_table[nic].model = qemu_strdup("usb");
         dev = usb_net_init(&nd_table[nic]);
     } else if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) {
         dev = usb_bt_init(devname[2] ? hci_init(p) :