From nobody Sun Feb 8 12:42:49 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=1607593309; cv=none; d=zohomail.com; s=zohoarc; b=NARgJHweZcPrxCfWTboAPG4mQfEbvy+c9zvMgcgbf/HYdO6pZ9v1Lcwu8ye8GNIdweU3yy90MbUbUgQLrEWPADYXmRESN+hCTEcIc/GtRXBCk8xAJLJiYXDfdSHh4gHOa8C5VOm54xrHT4UlMFxYOFzyIoFvz3fxPyQANZgn9r8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607593309; 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=lfUWfANrZ3mwTUWvBYkB0GMcbbM1r5BDks1gJ066+4k=; b=ZV4nDBp5r1U2H57RapxmQPyKkhJC+PhxHgpLxG2zLWVzbEXjs+JQBkVCR7G1CGuefQSWTiwCGFfrsiICVozl4anWhItVG3dNLTPLLwJvsZJcykCs6q7QB4odkMVTgIy9gLdlc+J+1JMNmblRDje3JGzeUj8BDzADdVFC9NoX81U= 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 1607593309753115.01308034686986; Thu, 10 Dec 2020 01:41:49 -0800 (PST) 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-561-HgiUO0UKNr6QXjMzIINcJw-1; Thu, 10 Dec 2020 04:41:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4550C59; Thu, 10 Dec 2020 09:41:40 +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 229F310023AC; Thu, 10 Dec 2020 09:41:40 +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 B795C4E58F; Thu, 10 Dec 2020 09:41:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BA9fI8J014837 for ; Thu, 10 Dec 2020 04:41:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5DF355B4D1; Thu, 10 Dec 2020 09:41:18 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4F036F7E5 for ; Thu, 10 Dec 2020 09:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607593308; 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=lfUWfANrZ3mwTUWvBYkB0GMcbbM1r5BDks1gJ066+4k=; b=H7+YhZFYpLolgTf/tN+SzgPOUi/P02A4F4eKwbkn1hxV2j7zvu5a95MGWVkd2ZW4v7yhI5 2RtLYhb8vr+hXZoUQERzF/G4tDODmviOilcISL7NUQ4VpOQ7+m0orI2hpWyiTLoEomL55T T2Rpi8dDuZehyo3MCnHztRo0+54YqmM= X-MC-Unique: HgiUO0UKNr6QXjMzIINcJw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] qemuBuildMemoryDeviceStr: check return of qemuBuildDeviceAddressStr Date: Thu, 10 Dec 2020 10:41:09 +0100 Message-Id: <8ea26973e1fbc0ecb7fb55eab395a87814db9a21.1607593175.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.22 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) Although the function currently only returns errors for PCI addresses, check it here too, in case that chamges in the future. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 76edc3c617..b06a086e18 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3317,7 +3317,8 @@ qemuBuildMemoryDeviceStr(const virDomainDef *def, virBufferAsprintf(&buf, "memdev=3Dmem%s,id=3D%s", mem->info.alias, mem->info.alias); =20 - qemuBuildDeviceAddressStr(&buf, def, &mem->info, qemuCaps); + if (qemuBuildDeviceAddressStr(&buf, def, &mem->info, qemuCaps) < 0) + return NULL; break; =20 case VIR_DOMAIN_MEMORY_MODEL_NONE: --=20 2.26.2