From nobody Fri Apr 11 19:20:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1645437387; cv=none; d=zohomail.com; s=zohoarc; b=aFO0Wwkp+M04xQNkaDXH5gebxZg7nqtdzysIKSPF3U8a1+0dDEYAm3X9V31Qa02SCrK/rlB/pqmOY1J0qFl8iH/+kDo/9W8ycQ5HB7NJRZ6i6NZJGbPyCOGx2YIviNBmTGv5k4AcgVqZZh9f/G9faLkpDj4ZdGHaWEdw09Z7YDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645437387; 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=hGBHyIm/ItY31LIZrGmDJbF5fU6iafmLA90Y6AKoCU4=; b=INaQCSklJG+0/UZFi4BCQxmfJyyyXc0XWjrHMDqwFN+NsotMCqJe486drbAGkWaD6MJuBn3Bh4HgsmYpRWj8sPyEmP9CLICIjCniemCrgcgE6qQOawsoZIrq7m0l4FpySnsJvznB9NP31abfFtyl6G2gsZlDNs4hX2LK/62Rd7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1645437387021196.54692277701974; Mon, 21 Feb 2022 01:56:27 -0800 (PST) Received: from localhost ([::1]:58392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM5Qh-0006hI-CA for importer@patchew.org; Mon, 21 Feb 2022 04:56:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM4zo-0000Dw-Ey for qemu-devel@nongnu.org; Mon, 21 Feb 2022 04:28:43 -0500 Received: from [2a00:1450:4864:20::432] (port=42610 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM4zZ-00013p-7c for qemu-devel@nongnu.org; Mon, 21 Feb 2022 04:28:36 -0500 Received: by mail-wr1-x432.google.com with SMTP id h6so25879614wrb.9 for ; Mon, 21 Feb 2022 01:28:24 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q76sm7555778wme.1.2022.02.21.01.28.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 01:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hGBHyIm/ItY31LIZrGmDJbF5fU6iafmLA90Y6AKoCU4=; b=tmmD1k++Yf9uqY7ElITtBruD7iSNu6r8eLI72rujHqpX0id05bQKxA6tlDD3v3kknI Bnu8DU8s3PP9k8BVjvaNQMUTqZAyxybJ/MVUdB9WQIfvhlmUFcxFd1C1Aw60kz7IRxtV zgIca79GJG6wiWLRr7LZ74ug0HK7KH+BnWy8PKheSsjF0PImsiDoAn3Fwo52CRfPi1zb Uq35HCD98KJDbPappgj/qDrmbrzbU0H8ote/VLee9DVq7srqpXpLKZ73f7bKrrnlqwbZ 5Heeu9l2TdD3wSdD1r4oI6gTHtSAe5IpL5XACFv7KYB7Wo4KYOnSFSJdOBm8b9C3K9hD INNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hGBHyIm/ItY31LIZrGmDJbF5fU6iafmLA90Y6AKoCU4=; b=K71tCrCmp3ipR1jH/L4sUr2GGYxDFndxD3fOf+Z3koxkhBhf2ijQ+KSXODiq/xPzK3 3Gj9h/5B88TN2wJe2mhFYiL8wEAQSddHJmrSptoIv+x4QN4BxVBqxWgl/PHmGLSVACg7 d4VYYynV+XpJXPCsY1a46zzCZoXpJ/pPZx0urgjWJEfwB+qQc2dLRT8QJHYQKtSKS1dn 9x8YSn8H1kfFfmx6EuLaC3YGJyuIOmOX33IPnyqKHgz4BVBhvxysCN7/OG4WkvTR/MAv tTodPIt+LvEuH3b99lwk85KAvhLXRDzYBHLg6FcL9GoV+ZgDHZKN3BHhd/58yDxhGDke X6jg== X-Gm-Message-State: AOAM530om92rJIB8mPIfEwqp38shkVZALYGEo3m99hrehSfsoLjgH7e/ CCgx6KlBfHEFgvZ5iefzg5DFvZ8Ntnl30g== X-Google-Smtp-Source: ABdhPJy/VoxJHYPK79LfYh49d7fFHF0c4F40nD+pOZ9lsQ/czro1MJOuXrBNxoXRrIsJ6+MbqqZrvQ== X-Received: by 2002:adf:9f45:0:b0:1e3:20e8:489a with SMTP id f5-20020adf9f45000000b001e320e8489amr14457565wrg.602.1645435703096; Mon, 21 Feb 2022 01:28:23 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/26] ui/cocoa: Fix the leak of qemu_console_get_label Date: Mon, 21 Feb 2022 09:28:00 +0000 Message-Id: <20220221092800.404870-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220221092800.404870-1-peter.maydell@linaro.org> References: <20220221092800.404870-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1645437398084100003 From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20220215080307.69550-14-f4bug@amsat.org Message-Id: <20220213021329.2066-1-akihiko.odaki@gmail.com> [PMD: Use g_autofree, suggested by Zoltan BALATON] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell --- ui/cocoa.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index f585a5c177d..a8f1cdaf926 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1674,7 +1674,9 @@ static void create_initial_menus(void) /* Returns a name for a given console */ static NSString * getConsoleName(QemuConsole * console) { - return [NSString stringWithFormat: @"%s", qemu_console_get_label(conso= le)]; + g_autofree char *label =3D qemu_console_get_label(console); + + return [NSString stringWithUTF8String:label]; } =20 /* Add an entry to the View menu for each console */ --=20 2.25.1