From nobody Sat Feb 7 07:31:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1582381573; cv=none; d=zohomail.com; s=zohoarc; b=ebSHZ9M8KEKeu99IXLCENUFfVMgMyXHiV9tofgGNkdT/PINCTcvs5hH/fsRDsoxoKQevpLQP2tN1LEebF3qTcTB11fXP5NzooVTZJYLo0xlmQl0R8pmjh0n46MWvwUnAv46nH5ufYkYKE5DqRaDOWstM/HZwE2KNRUZZtaYqDe0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582381573; 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=FlHnugkPO99jv/cQ9J54whr7CfKFCW8QWlXoF1PLC/M=; b=Yedr1bAOHVkDfZ8X04DsGZTy3obqZz2M6gfcIY0+a89c5f8Ht8/mOrHiuB++GxbXwAQnHwxkMzUxLuBdb0ozYOSWtqyQOb7G5dQELFoEeox6kHZ0coAudf8ug/9CS88dOMgsu8y88txlj4WPuTjOuoxYJOOr6OsgPqScEwAMuw8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1582381573370292.11640154778206; Sat, 22 Feb 2020 06:26:13 -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-429-YDZIVQcJNyCkYZJnF7gN6w-1; Sat, 22 Feb 2020 09:26:10 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ECFE7800D54; Sat, 22 Feb 2020 14:26:04 +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 7D7955C219; Sat, 22 Feb 2020 14:26:04 +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 36A5018034EE; Sat, 22 Feb 2020 14:26:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01MEPIoH008535 for ; Sat, 22 Feb 2020 09:25:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id 45CA890787; Sat, 22 Feb 2020 14:25:18 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4DB287B0A for ; Sat, 22 Feb 2020 14:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582381572; 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=FlHnugkPO99jv/cQ9J54whr7CfKFCW8QWlXoF1PLC/M=; b=hV+GYx/mEJ6VKqDe4Fp2Lj39b/H9Xd5bby9EXYnc9Nej6c3uwKAJmQjJFaAmhvewmoSMtp yOsgnsR8bDhZ/gdFKkgwMT/xfulBy4bELwg68BhcuU4IxshrgS3Wg+vS6InJYGQ1U2mU3B QTLfj/KNGRCWrFgFVvVVbKxFRzjyrak= X-MC-Unique: YDZIVQcJNyCkYZJnF7gN6w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/7] libxl: StateInitialize: use g_autofree Date: Sat, 22 Feb 2020 15:25:07 +0100 Message-Id: <51bf191c5eb9d61b5f4021b51064143c8fa5bc0d.1582381502.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use g_autofree to free the driver config file path. Signed-off-by: J=C3=A1n Tomko --- src/libxl/libxl_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 2b06f1be1e..0b88c9f9d9 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -652,7 +652,7 @@ libxlStateInitialize(bool privileged, void *opaque) { libxlDriverConfigPtr cfg; - char *driverConf =3D NULL; + g_autofree char *driverConf =3D NULL; char ebuf[1024]; bool autostart =3D true; =20 @@ -706,7 +706,6 @@ libxlStateInitialize(bool privileged, =20 if (libxlDriverConfigLoadFile(cfg, driverConf) < 0) goto error; - VIR_FREE(driverConf); =20 /* Register the callbacks providing access to libvirt's event loop */ libxl_osevent_register_hooks(cfg->ctx, &libxl_osevent_callbacks, cfg->= ctx); @@ -822,7 +821,6 @@ libxlStateInitialize(bool privileged, return VIR_DRV_STATE_INIT_COMPLETE; =20 error: - VIR_FREE(driverConf); libxlStateCleanup(); return VIR_DRV_STATE_INIT_ERROR; } --=20 2.24.1