mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
rpc: don't unref service ref on socket behalf twice
Second unref was added in [1]. We don't need it actually as
we pass free callback to virNetSocketAddIOCallback thus
when we call virNetSocketRemoveIOCallback the extra ref for
callback will be dropped without extra efforts.
[1] 355d8f470f
: virNetServerServiceClose: Don't leak sockets
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
255437eeb7
commit
1eae52b9f1
@ -449,6 +449,5 @@ void virNetServerServiceClose(virNetServerServicePtr svc)
|
||||
for (i = 0; i < svc->nsocks; i++) {
|
||||
virNetSocketRemoveIOCallback(svc->socks[i]);
|
||||
virNetSocketClose(svc->socks[i]);
|
||||
virObjectUnref(svc);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user