From patchwork Sat Sep 12 22:44:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEE72C433E2 for ; Sat, 12 Sep 2020 22:55:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 647CB214F1 for ; Sat, 12 Sep 2020 22:55:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jHmvi8LE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 647CB214F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEQC-0003mv-Dr for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:55:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHX-0003wl-T2; Sat, 12 Sep 2020 18:46:07 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:35849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHW-0004UJ-7K; Sat, 12 Sep 2020 18:46:07 -0400 Received: by mail-pg1-x542.google.com with SMTP id f2so6748505pgd.3; Sat, 12 Sep 2020 15:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8LMHSaPzW0hzgrIuj2ua/jt2cvPDmkrSyzCQ3oAKLyw=; b=jHmvi8LEbYgMToHQ52XQT2TcfvNTW+1GLczEAD+R86zh93R5kUN49R2yDear5okwI+ 55ecrVuh2x6SF6oKgOgq4qsvyqvpeRj344Qx6/KOkEgR7NujJ6bHm6Uu79QS5CFHrnU/ 97N7zYCwFSBfZ2yapKvyNb01VJaLHNnXgcN93XctfbnilrInOTJN37ap70fYVtwJfdI7 hJXCMR33JKoMROc59KI4ZCReV8S16Xjv2WGfiJqRU2zn6o/ihHSFBAidGNbkm6TNM2DS vBsu9eA9UNnJcwjtg+h17PITSkHC7Yrsnk0xLOgHrI7kbCoBIINB6RjaofvUPMYW4D1q GAuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8LMHSaPzW0hzgrIuj2ua/jt2cvPDmkrSyzCQ3oAKLyw=; b=kG3bJc6As3enagKZsoFQfTm0Bxj9G8IMrXrcJAqjG1ejVSjnsbLn9qE+RMpwQ9JUjO F5CKiygZcv1wIIRFX83E4im/fVXIjNK6GRdJAFEUUeLxuFKVrOjd/EGERyhUFiJKbWTE eiBzMsLUR4aJpDvABMunpLzsHFa+mXMBibRw+mmvuJRRR4XCkp9k3tL6MfCi0ENvM/Ri MTHCMjdZ2IstUG1XwHFuHcZOl6/WwXvpOSfdhCTue8RgSheDnG87cDuGUyvJOTxkf4A4 yJs+dKDBUBmGqu/YT3KDPTK+tO3PO01ilzL715tnD+AoENPxB73Y7Zm+sjwSAwASnbif gExQ== X-Gm-Message-State: AOAM5335xe5hUIMr+NpE7iyme50bDSWKc/SUDTx887Ge8g4+U2vHOYNV LS922B5HCdC7t+6tqiBZCQPeTMp0NF4fqhAzzD4= X-Google-Smtp-Source: ABdhPJy2MXXmCzZkjfPBisZ4yaM9BHQrES4zrJNmqt2G6nXy/B+lQHHqDE/51FKyuZ7DIihM8ctEpw== X-Received: by 2002:a63:7d5a:: with SMTP id m26mr6034071pgn.373.1599950763824; Sat, 12 Sep 2020 15:46:03 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:03 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 17/27] tests: Convert g_free to g_autofree macro in test-logging.c Date: Sun, 13 Sep 2020 06:44:21 +0800 Message-Id: <20200912224431.1428-18-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/test-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..783fe09a27 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -196,7 +196,7 @@ static void rmdir_full(gchar const *root) int main(int argc, char **argv) { - gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); + g_autofree gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); int rc; g_test_init(&argc, &argv, NULL); @@ -212,6 +212,5 @@ int main(int argc, char **argv) rc = g_test_run(); rmdir_full(tmp_path); - g_free(tmp_path); return rc; }