From patchwork Thu Jan 9 02:17:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182788 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3201981ile; Sun, 12 Jan 2020 09:42:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwg7JENXgLpVtUHnDrSPhn1oT9EtrUe8f4cnsBXn71Qtm9K3ef+uZHXIjXgnCK9CnT+Eb8O X-Received: by 2002:ac8:140c:: with SMTP id k12mr10853237qtj.117.1578845280111; Sun, 12 Jan 2020 08:08:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578845280; cv=none; d=google.com; s=arc-20160816; b=C6j7pad/+y5nZnHr7Jw7mE5Je2p1GBhXTeJHhWeDt2YKE7pUndVMB1AsJXgCQVbkjK uztTuWdPFQkuLD1vihsO1l2OIIx+KuyRDHoWe+thMX5+iqii+Y+EQewvgvBjmIyvjQpt BDjXxlL0T3MN45fpSMv741E4MXaOJI17XGUQyXoxvTVeo7eqR0mrYVYzRR9iYj6BuJzx uLB8YgNdAmO+z8aRyiPKgPuQN6Exqs9bLUdIaohk3vRzRpj8Bgb6V5RVB2Dm8Y2sOFTs 5Oxnu+u75KfE4bAQE8t/YcTbgajJFlZQP8vGmMBB1USYzPtwF8fnZ1MGvDi1lZTbsQdg EFRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=HbO57U5Hq9On8Ktr+WRBLRrRyCTJojmW4JU+oahW540=; b=i7rCEoGpaiNU9joFivNT8bpS6gYa+HZdIiVLS3laxsGaeihbjjQrJyGKmPBAlfI8rz nbmfswFrGIjVtGKCjzz+Ns1e49vkkCvzQVpZsvQ7We7ReYl9PWJIMtmz0QPI4GuvpOZg YElJWQzTfXbr25HT6EI0k2fneCVpJqr2UhifJ4pc6ft9Cvt4TaPWZLQUfH3riZzGWB/m j5Wbmj4D2j2HAWia2pptUqHi9xRq00MF660bi6x1dlxzkc+vO7UzORmW6sJTV2GPbcO8 EGZ4K9dAfSwezDw4fbsJBrHYEJho/1o/cK82tkUGe70/7SJ3StfwBdU3MN2LI7f9MC4x QSng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uKnU0jk7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 197si5138046qkm.223.2020.01.12.08.08.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2020 08:08:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uKnU0jk7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53429 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipNQz-0002pz-4A for patch@linaro.org; Wed, 08 Jan 2020 21:20:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34590) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipNO0-0007FW-Tt for qemu-devel@nongnu.org; Wed, 08 Jan 2020 21:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipNNz-00087i-Pv for qemu-devel@nongnu.org; Wed, 08 Jan 2020 21:17:24 -0500 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:54706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipNNz-00085C-Cc for qemu-devel@nongnu.org; Wed, 08 Jan 2020 21:17:23 -0500 Received: by mail-pj1-x1044.google.com with SMTP id kx11so439833pjb.4 for ; Wed, 08 Jan 2020 18:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HbO57U5Hq9On8Ktr+WRBLRrRyCTJojmW4JU+oahW540=; b=uKnU0jk7th8WOW03TQGS2qQHsZO9iA/QRWb7E+qQDhLvPPw3RJAzfiDPBO7We+Xbcc uHAZ6JooqY4A6oR1/FUI4Gp5nKcvKcvIF0eDQuebZoOZWvWM5isWUFAEW0ym/gJI21bV ezA/R/SalQ7OApBC62hZKhQ4uxN1t4RnnUddUyS/ORlMZS7TnGEn96uHMDgpDOn+KZVw bG3UfejmS8IdRBmbunpEBe67kM4T2baR/GpcO2WSsQXWAsP11PkaCWcmFlPaugj74bpF AdjBUmQA/51RNxKjpr9tPvWRYSylmJkVOD6uDKe7sWqPawA/3dRRZCN2SNzSHx0uol13 vthA== 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=HbO57U5Hq9On8Ktr+WRBLRrRyCTJojmW4JU+oahW540=; b=mwDM5hG6eXR4P0943kIJHOrHXMoVJoTfgC9l61rNQR8e6uDSWU/THSNQg6xL/+NV/a Cu2avQA7El6/6j6Wmud5ZNsDsYpczXqaJzfpkv4OSdSOXXhBEo3aQuoAv3Te5XjiZ5R1 sNnwAUVUvRRJ3uiBP5B0zaBPVLLTk1Fl10XgikMR9TMMz/tS4s9It/pJcoQKgH5LWUJa M+g+TE7rSuakiyNWoQqtdOzXR4/2fe7L0Dz9txvBzlbzSP3xo/rLVo02zXRzcFk7mxoU 8QFCL5RvuRgCkOMHPkjwJn26SFkmqQd14YUKcXrILdBXXP19BLYxyOIAyXCY9+FTFMKz A5zQ== X-Gm-Message-State: APjAAAXBZ/pUU6KAzmjZz/oiXkDLjb/SoLXSIqXGoUNxgK/a8Esh3ebj LVLPnmgqwDNgWhwqoVNjZj+3JlVhvsOuKA== X-Received: by 2002:a17:90a:19d3:: with SMTP id 19mr2294472pjj.1.1578536240516; Wed, 08 Jan 2020 18:17:20 -0800 (PST) Received: from localhost.localdomain (alanje.lnk.telstra.net. [120.151.179.201]) by smtp.gmail.com with ESMTPSA id n26sm5166715pgd.46.2020.01.08.18.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 18:17:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 2/4] vl: Free accel_list in configure_accelerators Date: Thu, 9 Jan 2020 13:17:08 +1100 Message-Id: <20200109021710.1219-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200109021710.1219-1-richard.henderson@linaro.org> References: <20200109021710.1219-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1044 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: pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We allocate the list with g_strsplit, so free it too. This freeing was lost during one of the rearrangements. Fixes: 6f6e1698a68c Signed-off-by: Richard Henderson --- vl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/vl.c b/vl.c index be79b03c1a..c9329fe699 100644 --- a/vl.c +++ b/vl.c @@ -2748,7 +2748,6 @@ static int do_configure_accelerator(void *opaque, QemuOpts *opts, Error **errp) static void configure_accelerators(const char *progname) { const char *accel; - char **accel_list, **tmp; bool init_failed = false; qemu_opts_foreach(qemu_find_opts("icount"), @@ -2756,6 +2755,8 @@ static void configure_accelerators(const char *progname) accel = qemu_opt_get(qemu_get_machine_opts(), "accel"); if (QTAILQ_EMPTY(&qemu_accel_opts.head)) { + char **accel_list, **tmp; + if (accel == NULL) { /* Select the default accelerator */ if (!accel_find("tcg") && !accel_find("kvm")) { @@ -2787,6 +2788,7 @@ static void configure_accelerators(const char *progname) error_report("invalid accelerator %s", *tmp); } } + g_strfreev(accel_list); } else { if (accel != NULL) { error_report("The -accel and \"-machine accel=\" options are incompatible");