From nobody Tue Feb 10 04:15:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1642171222; cv=none; d=zohomail.com; s=zohoarc; b=awaxPQ3GatU5zumzzfxdu7angC1Ph6DNQAXkUDJUugRWU2ZD2N/x4vfQe786mJauTcfHx3vDVTIQrHmvkeboxo7+oHaXHTXqVoR8j/m6lYOWfv8mYOS7Z1l8Sa0x0Z4YGojKesbTJSmg5je4Xo3U0eAGyPAY4GzJVC343p3ZmZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642171222; 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=hJddUhjK0R+etYoluMhdAYlKwEPx5+yoaemSiFX62GI=; b=nUIan20R0qTI7FASrpRMz3HofxY5mYbmdRySPqbGs4p8lQXQzxS9Uz8O7MGh7SVMjvvDUJutIJbjfGPFTy9okQC+IogF36KZDgzD1fsFBNjqSivZuwSfhH5x1GT3qVQh6NYa6lPTLcFhaOMT+IrbfK+4FiFxMpZxPy04Lxwx9T0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1642171222718898.3033415071851; Fri, 14 Jan 2022 06:40:22 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-i9mKlGVnNM-cNYN1JjBmaQ-1; Fri, 14 Jan 2022 09:40:19 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3BA21054F90; Fri, 14 Jan 2022 14:40:12 +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 B9F27798D5; Fri, 14 Jan 2022 14:40:12 +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 5F2901809CB8; Fri, 14 Jan 2022 14:40:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20EEeAvs029230 for ; Fri, 14 Jan 2022 09:40:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id A0DBA7B6ED; Fri, 14 Jan 2022 14:40:10 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 192F47B6F1 for ; Fri, 14 Jan 2022 14:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642171221; 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=hJddUhjK0R+etYoluMhdAYlKwEPx5+yoaemSiFX62GI=; b=iXZqpDW2op+ajk7cedgSGrlN0tf5FGz63lj0hff+G8Z79/k6Vn7/+yZ10fNuOnLvZQQZEs uVRzkku02PVh/XgvI/614Y4CrTHl3+hOgvCsRRF9x3ef6uKPMrp958g3I2N78XvfSw4CDo +lx+fbi2jFPX3sEJjKsXegtSOh3bk/g= X-MC-Unique: i9mKlGVnNM-cNYN1JjBmaQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 03/11] xen_xl: Check for virConfSetValue() retval Date: Fri, 14 Jan 2022 15:39:47 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.14 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: 1642171224796100005 Content-Type: text/plain; charset="utf-8" There's one case where the return value of virConfSetValue() is not checked for and it's in xenFormatXLInputDevs() function. Let's fix that. Signed-off-by: Michal Privoznik --- src/libxl/xen_xl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index 94268fb76d..e3ddae8827 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -1853,7 +1853,11 @@ xenFormatXLInputDevs(virConf *conf, virDomainDef *de= f) goto error; virConfFreeValue(usbdevices); } else { - virConfSetValue(conf, "usbdevice", usbdevices); + if (virConfSetValue(conf, "usbdevice", usbdevices) < 0) { + usbdevices =3D NULL; + goto error; + } + usbdevices =3D NULL; } } else { VIR_FREE(usbdevices); --=20 2.34.1