On 18.01.2019 13:32, Daniel P. Berrangé wrote: > On Fri, Jan 18, 2019 at 11:38:39AM +0300, Nikolay Shirokovskiy wrote: >> if virNetClientNew finishes with error before sock is set >> to client object then sock does not get unrefed. This is >> unexpected by function clients like virNetClientNewUNIX. >> Let's make sure sock gets unrefed on any error path. >> >> Next some clients like virNetClientNewLibSSH2 try to unref >> sock on virNetClientNew errors. This is not correct even >> before this patch because in some cases virNetClientNew >> unrefed sock on error path by itself. Let's give up >> sock managment to virNetClientNew entirely. >> >> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> >> --- >> src/rpc/virnetclient.c | 8 +++----- >> 1 file changed, 3 insertions(+), 5 deletions(-) > > Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> > Thanks! Pushed. Nikolay -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list