mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
netserver: close clients before stopping all drivers
So far clients were closed when disposing the daemon, after the state driver cleanup. This was leading to libvirtd crashing at shutdown due to missing driver. Moving the client close in virNetServerClose() fixes the problem. Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
0f33025a43
commit
2089ab2112
@ -774,10 +774,8 @@ void virNetServerDispose(void *obj)
|
||||
virObjectUnref(srv->programs[i]);
|
||||
VIR_FREE(srv->programs);
|
||||
|
||||
for (i = 0; i < srv->nclients; i++) {
|
||||
virNetServerClientClose(srv->clients[i]);
|
||||
for (i = 0; i < srv->nclients; i++)
|
||||
virObjectUnref(srv->clients[i]);
|
||||
}
|
||||
VIR_FREE(srv->clients);
|
||||
|
||||
VIR_FREE(srv->mdnsGroupName);
|
||||
@ -796,6 +794,9 @@ void virNetServerClose(virNetServerPtr srv)
|
||||
for (i = 0; i < srv->nservices; i++)
|
||||
virNetServerServiceClose(srv->services[i]);
|
||||
|
||||
for (i = 0; i < srv->nclients; i++)
|
||||
virNetServerClientClose(srv->clients[i]);
|
||||
|
||||
virObjectUnlock(srv);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user