From nobody Sun Feb 8 16:11:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1653399330; cv=none; d=zohomail.com; s=zohoarc; b=HDl14R1gls1CDGi35vW09JPlHtMso4aBFEIsNKAWScUzQhd3/9/rJFUe+5ktdYKsUBKt4Vu7NJOTsh96Vq/CQAKyicCM5udcCMCwa3kaEFkwFsuRTTgnzBKGDys7+l0yMxqvdvguLf0p6DSKJXMBWLLynH4M8zFObXbSdZhisN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653399330; 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=+wKnA4FDHIroXgpLc4yZzGJDAWaHuP74ElXL4AieVSw=; b=Ku3j5OgsZekHE6xHcHPqGDFzGGqV8YC1KCWEc1lsL3w8fgmzwFwBalDnyB9/Vdw2NWLYMUMYDQXcbYksDMzIZPbE2Gxn/saj7Vlkr2zP2infen5w1tCLzWDzRpyNZ4a/pRI+DfnTcATn3n3lQRrTHhfwhd4QeuKjFK3WXnk+0sA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 165339933040336.04377623819539; Tue, 24 May 2022 06:35:30 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-112-HwM7PSChM-aK_DH_1fTi-g-1; Tue, 24 May 2022 09:35:25 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4971E100BAB4; Tue, 24 May 2022 13:35:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A88F2166B48; Tue, 24 May 2022 13:35:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 62254194EBB5; Tue, 24 May 2022 13:35:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6E011194EB9C for ; Tue, 24 May 2022 13:35:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 424ECC08087; Tue, 24 May 2022 13:35:14 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2289CC15E71 for ; Tue, 24 May 2022 13:35:14 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 1A8FE245B4F; Tue, 24 May 2022 15:35:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653399329; 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=+wKnA4FDHIroXgpLc4yZzGJDAWaHuP74ElXL4AieVSw=; b=Ogy75HcWFWnSEB+9m5K3ohLjcj2gGYrif+gJKeSoIcBAl20epIBwDzHe+hFmnhzoYvCq3Q eQPYJ+Y2BAyb2TSyTCEHyfMDGbMkfk0ufQ4g5fRck7FJ3iudEd89aYV9pzyCm5N13ch32V MVp5KZpjocZPbIKBJmXZKQFhiuTkKgo= X-MC-Unique: HwM7PSChM-aK_DH_1fTi-g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 3/6] qemu: Make vm parameter of qemuProcessEventSubmit mandatory Date: Tue, 24 May 2022 15:35:06 +0200 Message-Id: <0edcfcec38fa28429474483cd650c1b291694249.1653399256.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653399332017100001 Content-Type: text/plain; charset="utf-8" All callers (QMP event handlers) always pass non-NULL vm pointer. Let's make the parameter mandatory. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 44a4bcfd74..e492f6961d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -284,16 +284,14 @@ qemuProcessEventSubmit(virQEMUDriver *driver, { struct qemuProcessEvent *event =3D g_new0(struct qemuProcessEvent, 1); =20 - if (vm) - event->vm =3D virObjectRef(vm); + event->vm =3D virObjectRef(vm); event->eventType =3D eventType; event->action =3D action; event->status =3D status; event->data =3D data; =20 if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) { - if (vm) - virObjectUnref(vm); + virObjectUnref(vm); qemuProcessEventFree(event); } } --=20 2.35.1