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

login
register
mail settings
Submitter Mark McLoughlin
Date Oct. 6, 2009, 11:16 a.m.
Message ID <1254827836-11021-3-git-send-email-markmc@redhat.com>
Download mbox | patch
Permalink /patch/35083/
State Superseded
Headers show

Comments

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

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) :