From nobody Mon Feb 9 23:38:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1595499374; cv=none; d=zohomail.com; s=zohoarc; b=fsjnnFPTbZrYAY2BSHm5dUCvmMUDmdcfil8LIJyHu3iwlwdsfqbeA/K5NjmMOCYGw5OH4wf/Z7ZVCXthTJe7MtBshYqxwco2UqjHjEfIUyAOKNaMmv9vNwustiycDRw9XgGd2Kj32iy4Ve4Ojel46QRyj3nL7PV3khKclhrxLT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595499374; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aa8O3+J+PA8uA0QOvs4LLxvJ2ZxnsTSNy/3Ov2ATgBE=; b=cu7f2MKy1SFR/7qmc/AGdCgG/Fdjki0xTiW+t0qEsKWAynHWwUQ2QfpEptPK9cZl9WulsQosgWZw+Ku8CybtZpuO28NRDCzbyzBJZDWhyVxCmg8AWCtsY6nhwvnGQgrBXjOzTqfYjebzynWwi3Agh4KEiza6JP77aWbMTiIfxHY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1595499374969169.95254599709426; Thu, 23 Jul 2020 03:16:14 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-216-GyKPLRzlMjO3pNWH1UPSbw-1; Thu, 23 Jul 2020 06:16:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE26419200C2; Thu, 23 Jul 2020 10:16:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87D431A8F7; Thu, 23 Jul 2020 10:16:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E02AB1800BB2; Thu, 23 Jul 2020 10:16:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06NAFqjw008429 for ; Thu, 23 Jul 2020 06:15:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DFA71065788; Thu, 23 Jul 2020 10:15:52 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77ECA1065753 for ; Thu, 23 Jul 2020 10:15:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D2FC8007CB for ; Thu, 23 Jul 2020 10:15:50 +0000 (UTC) Received: from relay3.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-rvZb4kntPwmQrquK3YAVUA-1; Thu, 23 Jul 2020 06:15:47 -0400 Received: from [172.16.50.220] (helo=vz7.localdomain) by relay3.sw.ru with esmtp (Exim 4.93) (envelope-from ) id 1jyYGM-0007ZV-Sf for libvir-list@redhat.com; Thu, 23 Jul 2020 13:15:42 +0300 X-MC-Unique: GyKPLRzlMjO3pNWH1UPSbw-1 X-MC-Unique: rvZb4kntPwmQrquK3YAVUA-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH v2 04/13] rpc: don't unref service ref on socket behalf twice Date: Thu, 23 Jul 2020 13:14:04 +0300 Message-Id: <1595499253-584162-5-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1595499253-584162-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1595499253-584162-1-git-send-email-nshirokovskiy@virtuozzo.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel Henrique Barboza --- 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 sv= c) for (i =3D 0; i < svc->nsocks; i++) { virNetSocketRemoveIOCallback(svc->socks[i]); virNetSocketClose(svc->socks[i]); - virObjectUnref(svc); } } --=20 1.8.3.1