From nobody Sun Feb 8 21:12:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1560863472; cv=none; d=zoho.com; s=zohoarc; b=mMpm7qrL3PienUsoa7PDWMf0TpIY81mn+fA6rdCkBgnx/Bvl1Wo8up4Mkw4PvvN0nQ7xG7lzxbSMOOFix0Lnrh9b0UB/4PjVGjXCL8Kal8pJLSx2KDFqqlmyg2zm1MKQLOb4V2wakUR/OXzqhAJ1jMyOjZSUvdPXtpk4/rXQJR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560863472; 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:ARC-Authentication-Results; bh=kyt/ZN5jYRAbthVUByj8L8DnNP5wgFxv/Nhpt4GJmqM=; b=f36K4FazAR7umI4VJR7n3fJxwpvTUIg/jsHjxQ124zX/WRCUlRtoev16yGV61SXGaffspJsLfq46zosTUlProldgY2nNFWeoE1gdp2dyG0Dg8pI1v9ZX6E2pO+0tg331jMv8AT64H6xR0ZSQiUPg6oKcsDxlxGWJ01LymYDFli8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560863472615300.3125331882293; Tue, 18 Jun 2019 06:11:12 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 37219307D963; Tue, 18 Jun 2019 13:11:02 +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 047096606C; Tue, 18 Jun 2019 13:11:01 +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 B42941806B18; Tue, 18 Jun 2019 13:10:59 +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 x5IDAUkK018688 for ; Tue, 18 Jun 2019 09:10:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6E0C81001DCB; Tue, 18 Jun 2019 13:10:30 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDC311001DE4 for ; Tue, 18 Jun 2019 13:10:29 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 18 Jun 2019 15:10:12 +0200 Message-Id: <0dd365ba9921813b2c3e4668fc6a054e494dd97b.1560863172.git.pkrempa@redhat.com> 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 Subject: [libvirt] [PATCH 03/15] qemu: domain: Use virStringListFreeCount in qemuDomainXmlNsDefFree 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 18 Jun 2019 13:11:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 74d5186bc7..362b860c73 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3094,20 +3094,13 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPriva= teDataCallbacks =3D { static void qemuDomainXmlNsDefFree(qemuDomainXmlNsDefPtr def) { - size_t i; - if (!def) return; - for (i =3D 0; i < def->num_args; i++) - VIR_FREE(def->args[i]); - for (i =3D 0; i < def->num_env; i++) { - VIR_FREE(def->env_name[i]); - VIR_FREE(def->env_value[i]); - } - VIR_FREE(def->args); - VIR_FREE(def->env_name); - VIR_FREE(def->env_value); + virStringListFreeCount(def->args, def->num_args); + virStringListFreeCount(def->env_name, def->num_env); + virStringListFreeCount(def->env_value, def->num_env); + VIR_FREE(def); } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list