aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/virtio-net.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index dd28a5a0a4..0a34a8b908 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1510,13 +1510,8 @@ void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
assert(type != NULL);
g_free(n->netclient_name);
- n->netclient_name = NULL;
g_free(n->netclient_type);
- n->netclient_type = NULL;
-
- if (name != NULL) {
- n->netclient_name = g_strdup(name);
- }
+ n->netclient_name = g_strdup(name);
n->netclient_type = g_strdup(type);
}