[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/24] Use qemu_strdup() for NICInfo string fields
From: |
Mark McLoughlin |
Subject: |
[Qemu-devel] [PATCH 01/24] Use qemu_strdup() for NICInfo string fields |
Date: |
Wed, 23 Sep 2009 11:24:00 +0100 |
Signed-off-by: Mark McLoughlin <address@hidden>
---
net.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net.c b/net.c
index 3fdf1e6..c276d0a 100644
--- a/net.c
+++ b/net.c
@@ -2364,7 +2364,7 @@ void qemu_check_nic_model_list(NICInfo *nd, const char *
const *models,
int i, exit_status = 0;
if (!nd->model)
- nd->model = strdup(default_model);
+ nd->model = qemu_strdup(default_model);
if (strcmp(nd->model, "?") != 0) {
for (i = 0 ; models[i]; i++)
@@ -2450,13 +2450,13 @@ int net_client_init(Monitor *mon, const char *device,
const char *p)
}
}
if (get_param_value(buf, sizeof(buf), "model", p)) {
- nd->model = strdup(buf);
+ nd->model = qemu_strdup(buf);
}
if (get_param_value(buf, sizeof(buf), "addr", p)) {
- nd->devaddr = strdup(buf);
+ nd->devaddr = qemu_strdup(buf);
}
if (get_param_value(buf, sizeof(buf), "id", p)) {
- nd->id = strdup(buf);
+ nd->id = qemu_strdup(buf);
}
nd->nvectors = NIC_NVECTORS_UNSPECIFIED;
if (get_param_value(buf, sizeof(buf), "vectors", p)) {
@@ -2804,7 +2804,7 @@ void net_client_uninit(NICInfo *nd)
nd->vlan->nb_guest_devs--;
nb_nics--;
nd->used = 0;
- free((void *)nd->model);
+ qemu_free((void *)nd->model);
}
static int net_host_check_device(const char *device)
--
1.6.2.5
- [Qemu-devel] [PATCH 00/19 v2] Port -net to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 01/24] Use qemu_strdup() for NICInfo string fields,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 04/24] Correctly free nd structure, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 20/24] Clean up legacy code in net_client_init(), Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 11/24] Add qemu_opts_validate() for post parsing validation, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 02/24] Don't assign a static string to NICInfo::model, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 03/24] Make NICInfo string fields non-const, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 10/24] Make qemu_opts_parse() handle empty strings, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 09/24] Remove double error message for -device option parsing, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 13/24] Add qemu_net_opts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 23/24] Port PCI NIC hotplug to QemuOpts, Mark McLoughlin, 2009/09/23
- [Qemu-devel] [PATCH 06/24] Fix coding style issue, Mark McLoughlin, 2009/09/23