From patchwork Wed Sep 20 08:28:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anish Kumar X-Patchwork-Id: 9961105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F40AD601D5 for ; Wed, 20 Sep 2017 08:40:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E49AE29025 for ; Wed, 20 Sep 2017 08:40:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D807E29027; Wed, 20 Sep 2017 08:40:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 319D429025 for ; Wed, 20 Sep 2017 08:40:02 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AD28C267277; Wed, 20 Sep 2017 10:28:54 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3F9BB26727D; Wed, 20 Sep 2017 10:28:53 +0200 (CEST) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by alsa0.perex.cz (Postfix) with ESMTP id CA847267276 for ; Wed, 20 Sep 2017 10:28:49 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id u18so1275487pgo.1 for ; Wed, 20 Sep 2017 01:28:49 -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; bh=zRO+U+PdOZRXznlj610zfQPXlt4XNCgKsAO0pr3Wtuo=; b=HLUxLCyKtKZG9O2VJAb9bdGnRxlRVdGAEo78nJTST7xii9HEA3YO90ZSE4C0M7H0mg HPgv8y9Cc/7SQzb03iO/Q4Zn/ZLcY7T6jqIUXHEXLa2BTVOhX2bE/EiCvPPiVNtWK51T w/WP2OZIwXiU7aJq45pOdn+jecTA/5APomRhX/UtarFrgYlxzRMDVouLDnKF5Shgb/21 yHCSp+AH6SczcEmuOueKbe/RqRR7VpVtamOwCM9slk+98jaCpkjE9zo4FJWYuecAgHHh cwn+dp3WMPC1ozl25XuhDk7xIbTKpJndYMCdbJFsxmRzStk5w7sGTFHUZWCKrc2wVlY2 lhkg== 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; bh=zRO+U+PdOZRXznlj610zfQPXlt4XNCgKsAO0pr3Wtuo=; b=VDn5a006NhxTi9qPx8x6km8bWiYMzy/7k94QHuvJzs/tNu5UgnlydbUL9LdCz3aVqR vh0S95+r2x7Vs6WislynQI5qVlFyOv73RmDwkXgfwKduRtgL8tdDEKSo7ZJVBLjaYU3n XC/UDCDo85t+EoDLDQRNKEx47nl+0Z7XDQ/QtHs1dWCxKgYccbDKvRFObI98WIYtJrdY URwbhYpAUOjcR5Pq/EZLaP/HVIO5ChJ4ClbNmUUu9Gp1OuHhYmk/FDGv16jycdUj2O/0 FnXpR8ymO0kJO+5slSNpRGJUq3//vMHpSpMdlii3PMrpdOiYCWrBSsA6AVUycszH6Z6J L3dg== X-Gm-Message-State: AHPjjUgBHAQiDxwloKsQfEnsv/PmfnpOUym/XZ1GZxp4KadUGxYVqCC2 nOmvb6IeWAshLReWZq6w6uk= X-Google-Smtp-Source: AOwi7QDGPFxrlYaARrDxEKMbirUPpdzaIKLqCeFGLPpMlqD6Xj4cDArMsSdc3lcGjRreAx09I8vJWQ== X-Received: by 10.99.184.9 with SMTP id p9mr1369007pge.6.1505896128234; Wed, 20 Sep 2017 01:28:48 -0700 (PDT) Received: from anishs-MacBook-Pro.local.net ([24.6.106.169]) by smtp.gmail.com with ESMTPSA id z83sm6229607pfd.10.2017.09.20.01.28.47 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Sep 2017 01:28:47 -0700 (PDT) From: yesanishhere@gmail.com To: ckeepax@opensource.cirrus.com, broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, alsa-devel@alsa-project.org, tiwai@suse.com Date: Wed, 20 Sep 2017 01:28:33 -0700 Message-Id: <1505896116-43310-2-git-send-email-yesanishhere@gmail.com> X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: <1505896116-43310-1-git-send-email-yesanishhere@gmail.com> References: <1505896116-43310-1-git-send-email-yesanishhere@gmail.com> Cc: anish kumar Subject: [alsa-devel] [Resend] [PATCH 1/4] ASoC: dapm: fix error path in snd_soc_dapm_new_pcm X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: anish kumar w_param_text[count] is freed in the wrong error path. Fix it by shifting the outfree_w_param label. Signed-off-by: anish kumar Reviewed-by: Charles Keepax --- sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dcef67a..f51f613 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3907,9 +3907,9 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, devm_kfree(card->dev, (void *)private_value); outfree_link_name: devm_kfree(card->dev, link_name); -outfree_w_param: for (count = 0 ; count < num_params; count++) devm_kfree(card->dev, (void *)w_param_text[count]); +outfree_w_param: devm_kfree(card->dev, w_param_text); return ret;