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] 355d8f470f9: virNetServerServiceClose: Don't leak sockets
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/rpc/virnetserverservice.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 9d5df45..e4165ea 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -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);
}
}
--
1.8.3.1