]> xenbits.xensource.com Git - libvirt.git/commit
virNetSocketRemoveIOCallback: Be explicit about unref
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Jun 2015 12:15:08 +0000 (14:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 19 Jun 2015 09:19:24 +0000 (11:19 +0200)
commit899e49a2e605df2b23f4ed3e905a4139379e7d75
tree223bd119d32e88a6508aee1910e7b04c7d0aa043
parent058d18bdbce81c272c51d7a5a2eea89681d40406
virNetSocketRemoveIOCallback: Be explicit about unref

When going through the code I've notice that
virNetSocketAddIOCallback() increases the reference counter of
@socket. However, its counter part RemoveIOCallback does not. It took
me a while to realize this disproportion. The AddIOCallback registers
our own callback which eventually calls the desired callback and then
unref the @sock. Yeah, a bit complicated but it works. So, lets note
this hard learned fact in a comment in RemoveIOCallback().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/rpc/virnetsocket.c