qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Don't assign a static string to NICInfo::model


From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH] Don't assign a static string to NICInfo::model
Date: Tue, 6 Oct 2009 12:16:52 +0100

Signed-off-by: Mark McLoughlin <address@hidden>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]