diff options
author | Mark McLoughlin | 2009-10-06 13:16:51 +0200 |
---|---|---|
committer | Anthony Liguori | 2009-10-06 21:36:10 +0200 |
commit | 32a8e14a0b4070a6c389371ce5540238264cbf17 (patch) | |
tree | 6d85a7f73afb7cc68be9ba34a7c5e9fd16e34fcd | |
parent | Register rtc options for -set (diff) | |
download | qemu-32a8e14a0b4070a6c389371ce5540238264cbf17.tar.gz qemu-32a8e14a0b4070a6c389371ce5540238264cbf17.tar.xz qemu-32a8e14a0b4070a6c389371ce5540238264cbf17.zip |
Use qemu_strdup() for NICInfo string fields
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | net.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2380,7 +2380,7 @@ int qemu_find_nic_model(NICInfo *nd, const char * const *models, int i; if (!nd->model) - nd->model = strdup(default_model); + nd->model = qemu_strdup(default_model); for (i = 0 ; models[i]; i++) { if (strcmp(nd->model, models[i]) == 0) @@ -2459,13 +2459,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)) { |