diff --git a/net/net.c b/net/net.c index f9e7136a2b..be03a8dd14 100644 --- a/net/net.c +++ b/net/net.c @@ -287,7 +287,9 @@ static void qemu_cleanup_net_client(NetClientState *nc) { QTAILQ_REMOVE(&net_clients, nc, next); - nc->info->cleanup(nc); + if (nc->info->cleanup) { + nc->info->cleanup(nc); + } } static void qemu_free_net_client(NetClientState *nc)