diff options
Diffstat (limited to 'hw/net/rocker/rocker.c')
-rw-r--r-- | hw/net/rocker/rocker.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index 1af1e6fa2f..c53a02315e 100644 --- a/hw/net/rocker/rocker.c +++ b/hw/net/rocker/rocker.c @@ -127,13 +127,7 @@ RockerPortList *qmp_query_rocker_ports(const char *name, Error **errp) } for (i = r->fp_ports - 1; i >= 0; i--) { - RockerPortList *info = g_malloc0(sizeof(*info)); - info->value = g_malloc0(sizeof(*info->value)); - struct fp_port *port = r->fp_port[i]; - - fp_port_get_info(port, info); - info->next = list; - list = info; + QAPI_LIST_PREPEND(list, fp_port_get_info(r->fp_port[i])); } return list; |