From nobody Sun Feb 8 14:31:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600810403; cv=none; d=zohomail.com; s=zohoarc; b=UWfGWLW/z6mv2BpEUYXY/NNghMY5z5UW9m7E7nzYHpG+RlJNzATgcEQI0SujiVEBpZkEYsRR3rVyfs2BBGyzIEa/eUWjGLlZtPKXqxVRnXVUkabmGYUz5d93T/v5sQOL9DY7oKfsGL7xQ+6mgbkkCJMdMKuEnn+mnIdld29scC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600810403; 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=qjO+tjH0mIqIKP35K6uRx3t+RL80UKJk8x/GMjCho+g=; b=KgPLGbGMnHWc/a3iBst/PyZ8RKLT7yUHGPUZ1/2Xw5Tm0ayCZpyS51i90g6KatIsD5b4T0m4Zcx/IPg2QXGkn+z+8oDqi5IDkvi4HBxkEsZp0aO8t/OQuZkvlUSGZf+kKxkfocCw6xC48lJFVqEUzpZ1gZocUmC8PpMJ5Jp1TAM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 160081040308389.09993305312582; Tue, 22 Sep 2020 14:33:23 -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-571-Q_Pml44BM128fcEsxt2ngg-1; Tue, 22 Sep 2020 17:33:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A61E7186841D; Tue, 22 Sep 2020 21:33:13 +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 878DA73689; Tue, 22 Sep 2020 21:33:13 +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 546DB1826D33; Tue, 22 Sep 2020 21:33:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08MLWlkm022703 for ; Tue, 22 Sep 2020 17:32:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1EFF7100164C; Tue, 22 Sep 2020 21:32:47 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98F5C100239F for ; Tue, 22 Sep 2020 21:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600810401; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qjO+tjH0mIqIKP35K6uRx3t+RL80UKJk8x/GMjCho+g=; b=EkHtx+ekbjTshTVlI7hDv5KtwgiRKCNvDdxUJ8iijTrjggNKWVX2sHKtCrhWrelhDXsSVG VtpdEgNW9oDlPJeBjlCcWt3YjnyYNuthQhTcB7Vc+dqEpJcqypgZRPilTS882R40DIIMp7 SBSELjJLyVRTvFjBenlPky/mUhAYR/o= X-MC-Unique: Q_Pml44BM128fcEsxt2ngg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/5] util: event: check return value of virInitialize Date: Tue, 22 Sep 2020 23:32:29 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.79 on 10.5.11.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This function can possibly fail. Signed-off-by: J=C3=A1n Tomko Fixes: 2e07a1e14635ad25c57b66c13488feff4c8d2b0c --- src/util/virevent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virevent.c b/src/util/virevent.c index 3477d63554..f6eb806faf 100644 --- a/src/util/virevent.c +++ b/src/util/virevent.c @@ -305,7 +305,8 @@ int virEventRegisterDefaultImpl(void) { VIR_DEBUG("registering default event implementation"); =20 - virInitialize(); + if (virInitialize() < 0) + return -1; =20 virResetLastError(); =20 --=20 2.26.2