From nobody Mon Feb 9 08:56:46 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=1594719243; cv=none; d=zohomail.com; s=zohoarc; b=V55z6Uu0oCRHztw7Luxvron+e3L4erGOe/6cOqWkqzBWjdlZOyxh8n/8ZhT7HTEet9FSzE8iZSqSfS0M6IFjykrbaoqfmNlAuxxZ6SNVERJLtGmAYQUhoJar6fl/xTfhXQm8yXfnbx2dW1vvCu+6bnTgAykfFRz3d1Y76dSbHZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594719243; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=XwaNH5OBu4AkV4T+fQo7LslUVpRnGZ49Yx//E42mPKM=; b=bJCwm2g7wdu/HtobO/l7EegKF9V0jHY8+ayumd2WxjWpVciZtXRBEpbhayM1JQSMz/SMF91TSejqK//Eh2zQzRlJBI1P0dQIMf7ATMTuQMv1V8+MSTb2MaPB5MOiglgRdfbe264xH88aw6ubY0s9L6z2C46nJOCXpfZP1rwyxEY= 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 159471924345872.34191796189316; Tue, 14 Jul 2020 02:34:03 -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-39-Dmi1ipLlPO-1y1KqwTNkNA-1; Tue, 14 Jul 2020 05:33:44 -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 D9620193F56B; Tue, 14 Jul 2020 09:33:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7BB31A8EC; Tue, 14 Jul 2020 09:33:38 +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 8604794F05; Tue, 14 Jul 2020 09:33:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06E9XNgW027951 for ; Tue, 14 Jul 2020 05:33:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id CAEA52156A4F; Tue, 14 Jul 2020 09:33:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C72932157F26 for ; Tue, 14 Jul 2020 09:33:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 7ECDF185A797 for ; Tue, 14 Jul 2020 09:33:21 +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-216-lTfeyAehNzaIvqCADFnsEg-1; Tue, 14 Jul 2020 05:33:18 -0400 Received: from [172.16.50.220] (helo=vz7.localdomain) by relay3.sw.ru with esmtp (Exim 4.93) (envelope-from ) id 1jvHJB-00044B-LQ for libvir-list@redhat.com; Tue, 14 Jul 2020 12:33:05 +0300 X-MC-Unique: Dmi1ipLlPO-1y1KqwTNkNA-1 X-MC-Unique: lTfeyAehNzaIvqCADFnsEg-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH 04/10] rpc: don't unref service ref on socket behalf twice Date: Tue, 14 Jul 2020 12:32:55 +0300 Message-Id: <1594719181-546271-5-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1594719181-546271-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1594719181-546271-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Daniel P. Berrang=C3=A9 --- 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