From nobody Fri Nov 21 10:11:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1762440831; cv=none; d=zohomail.com; s=zohoarc; b=GBZno52haioC1Stfz877m2V7jUldZ42eLwlDqdGcagfXRSZ2wN9kyYgB/DQw3dYmRrUcd6Eph9iuNuMVL3ELKLIKgbWbBLqrbWeRY9xMHELbgYk94wDyxlrWYglV4greZvKxv5STA0MlcxjVVp9IUlEIcEpxw9ULXuoGtHpJlDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762440831; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=q7XOoN/jcZyT7tLQPViBnEqRLl6o73urn+OYku2Qfgk=; b=ZErXuqWJMTUEacitS5b/+rholD5077vaWw9xEHwMs6kC+Ejb3pGgA6p0ZEIlqK8+EviVJwEpXDLEvB1J3hYQ51IbebtH3oFLsGbuWg8KwTD7zFYwBUdBwIYZK0TDtnTGKeN2CLAnaM69CAu2SIpAg/oTTnOF8A1gKO9BdqsDSVM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762440831284720.3869260617299; Thu, 6 Nov 2025 06:53:51 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 93C4044203; Thu, 6 Nov 2025 09:53:50 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id DE0EB44226; Thu, 6 Nov 2025 09:51:53 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 539F0418F9; Thu, 6 Nov 2025 09:50:57 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9D94E41988 for ; Thu, 6 Nov 2025 09:50:56 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-304-G2PqPWrLO62ecw7hGWrZWQ-1; Thu, 06 Nov 2025 09:50:54 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0A68D180034A for ; Thu, 6 Nov 2025 14:50:54 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.39]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AE1F8180049F; Thu, 6 Nov 2025 14:50:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762440656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q7XOoN/jcZyT7tLQPViBnEqRLl6o73urn+OYku2Qfgk=; b=XjQLeoUH62Z8MGFN7kzpchiZUgSS9ZMt8LtPA2gGn1pbbA4PTYIc7sJAHN+0aAWdBc3yCn dseLsFz1JNCDN7Xfp4S0XCUuoH189f/UZE5wXDMOOBsSNYTSmB/B2yo/Ex6YBiqEdJxxIX y8P1TGGL6q9GDHVVZZyDZBLz7xvbAQU= X-MC-Unique: G2PqPWrLO62ecw7hGWrZWQ-1 X-Mimecast-MFC-AGG-ID: G2PqPWrLO62ecw7hGWrZWQ_1762440654 To: devel@lists.libvirt.org Subject: [PATCH 01/10] remote: use g_strfreev for free()ing lists of strings Date: Thu, 6 Nov 2025 14:50:41 +0000 Message-ID: <20251106145050.1851526-2-berrange@redhat.com> In-Reply-To: <20251106145050.1851526-1-berrange@redhat.com> References: <20251106145050.1851526-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: x1GjULAhh9-yD9lHq9lZhRsYo3WxjD7ViyMbS4FMWO4_1762440654 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: G7HGAMVMAZWRYADZQRNBALLZWIT3NONO X-Message-ID-Hash: G7HGAMVMAZWRYADZQRNBALLZWIT3NONO X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1762440832412154100 From: Daniel P. Berrang=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 --- src/remote/remote_daemon_config.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_c= onfig.c index 2a41c27dfc..c1e75444e1 100644 --- a/src/remote/remote_daemon_config.c +++ b/src/remote/remote_daemon_config.c @@ -168,8 +168,6 @@ daemonConfigNew(bool privileged G_GNUC_UNUSED) void daemonConfigFree(struct daemonConfig *data) { - char **tmp; - if (!data) return; =20 @@ -179,12 +177,7 @@ daemonConfigFree(struct daemonConfig *data) g_free(data->tcp_port); #endif /* ! WITH_IP */ =20 - tmp =3D data->access_drivers; - while (tmp && *tmp) { - g_free(*tmp); - tmp++; - } - g_free(data->access_drivers); + g_strfreev(data->access_drivers); =20 g_free(data->unix_sock_admin_perms); g_free(data->unix_sock_ro_perms); @@ -192,20 +185,10 @@ daemonConfigFree(struct daemonConfig *data) g_free(data->unix_sock_group); g_free(data->unix_sock_dir); =20 - tmp =3D data->sasl_allowed_username_list; - while (tmp && *tmp) { - g_free(*tmp); - tmp++; - } - g_free(data->sasl_allowed_username_list); + g_strfreev(data->sasl_allowed_username_list); =20 #ifdef WITH_IP - tmp =3D data->tls_allowed_dn_list; - while (tmp && *tmp) { - g_free(*tmp); - tmp++; - } - g_free(data->tls_allowed_dn_list); + g_strfreev(data->tls_allowed_dn_list); =20 g_free(data->tls_priority); =20 --=20 2.51.1