• M
    virNetServerServiceClose: Don't leak sockets · 355d8f47
    Michal Privoznik 提交于
    Well, if a server is being destructed, all underlying services and
    their sockets should disappear with it. But due to bug in our
    implementation this is not the case. Yes, we are closing the sockets,
    but that's not enough. We must also:
    
    1) Unregister them from the event loop
    2) Unref the service for each socket
    
    The last step is needed, because each socket callback holds a
    reference to the service object. Since in the first step we are
    unregistering the callbacks, they no longer need the reference.
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    355d8f47
virnetserverservice.c 14.8 KB