Message ID | 1497544320-2269-16-git-send-email-stanimir.varbanov@linaro.org |
---|---|
State | Accepted |
Commit | 17571ed6e238ef1353595a87b40414d12b0e0275 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp888255qgd; Thu, 15 Jun 2017 09:33:24 -0700 (PDT) X-Received: by 10.98.5.130 with SMTP id 124mr6024045pff.209.1497544404375; Thu, 15 Jun 2017 09:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497544404; cv=none; d=google.com; s=arc-20160816; b=e+lQzzx+Gl/A2IZOF212WLjYuxupMDbnWziwxqYgEEkV0cgWLkN4uJ1zVzDkFlGKGq ZRv7wQLGUN/hyuM9R0cH6uutTwq9AlEJ/hg0cxd6W8g5s2QZrQeIwbbtCez45MFqCxTO 0xKxAxHyX1M7Cx4rpInKCSWNF9J4b0EGGPCyzihUFrn/nqwx3nC4X2ztnVvjcS8vG8Bf cybGz6B/ZKA7r3bjSCRndvsQTwFmiJ483FgSMirIJ1FZCsPNt0lp7NqGr+5bu4MMEJfT avnM8AugXjXdqTrR/B4sg7Td2052P4eNCVwB4cwqN+knuyQ/irJNykeh4efTXCvml3oG SJ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=8htfl3CcJ3YWD/QYw4Fko1jWLy+GNotLu0EgG2OZd/E=; b=YHbyg/5dU0DiXHRh0SwSp8UvvcKsUcnU7zSDANKRfJbWumbL4MO4AInEnaiVPePFIE 1fLHjAghObshdhjpUsxgvLWsRAZ/iPaiPA311HiSZKCUl/Xk9UD5J6VPixLZoAO0zkQk es5B1j5nYQZXk9ojdizh/Rgtei60TnUG5beqon/9DM9YTlBvYdDUlOAQguUT6/wP+01x QxwYST6CdepO4cMdH6jgQeO7S0WpFvSiMx+3T7mE/iR8racYlJ17DaucCHgrrW48BqOr TiGTs88JS6GcMsMCNt2e1/m8O8tFr3JYvjBjbLaIEF0xQmFNz4Cvh9fzK+7VdErKsWQC KR1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=FKWjbfZh; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-arm-msm-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si397449pfl.413.2017.06.15.09.33.24; Thu, 15 Jun 2017 09:33:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=FKWjbfZh; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbdFOQdS (ORCPT <rfc822;georgi.djakov@linaro.org> + 10 others); Thu, 15 Jun 2017 12:33:18 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34883 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbdFOQdR (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Thu, 15 Jun 2017 12:33:17 -0400 Received: by mail-wm0-f48.google.com with SMTP id x70so4454837wme.0 for <linux-arm-msm@vger.kernel.org>; Thu, 15 Jun 2017 09:33:17 -0700 (PDT) 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; bh=LddNM0B7BF2Q1NR9owPFwmfghKr/CobKCgYvCgn0VcA=; b=FKWjbfZhz+ibSuga+28GvIX7NpiZt8TqK6phg/87VxeiGT7R0rQRDJq7rNgDFvGZHc dm/J3ZXBek67r+wlz+UO6c1TbcGKIoudNDw2DaJ7h+MIQBMbny4gWjVSH+ebeQwgWJK7 s/9ABWAkmrIQzxIhMnoTRM7rhriY7q+1QkOUg= 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=LddNM0B7BF2Q1NR9owPFwmfghKr/CobKCgYvCgn0VcA=; b=JP5qCBKXksRP2fmktG/ZG2Kpqrn8k+AQLGQD+OwuEv4xjqwR6HtnDEF1U2FaUS6Zr9 outbfMH1BaGc70iNg2U81KSD+W2dJNnBLVihtgcIQ4ilwHioPueAxo6570k5fSC/wdQ0 J/y7nFKlx+PtN9Jo2tt874pmhWP9kR0pz1lnvdMARCxSsLC7g5z2MH9d2Q5fLYv9mYae xpto6SnrBOLSJRTUJdr6BJqHvrIT+UaQYQOfgCmHUvAcXOTl6LE8mtDNVPI7og8bduBk MBt9bEcqO8w1fMOv278GpTPbbJrVzBcoH1jZ7+r8wuNZ+pjDcV3AtbRzRVvXVRcWVNzG hZFg== X-Gm-Message-State: AKS2vOwyqHXLcSk9V3kJcRXd4bcVzZjg4Aqq7v4BzGnHv06OcKGTeGBf gwpGYwT6yKToFB0C X-Received: by 10.28.66.86 with SMTP id p83mr4361511wma.31.1497544396183; Thu, 15 Jun 2017 09:33:16 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id m73sm541890wmi.25.2017.06.15.09.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Jun 2017 09:33:15 -0700 (PDT) From: Stanimir Varbanov <stanimir.varbanov@linaro.org> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil@xs4all.nl> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov <stanimir.varbanov@linaro.org> Subject: [PATCH v11 15/19] media: venus: vdec: fix compile error in vdec_close Date: Thu, 15 Jun 2017 19:31:56 +0300 Message-Id: <1497544320-2269-16-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497544320-2269-1-git-send-email-stanimir.varbanov@linaro.org> References: <1497544320-2269-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 96e7e7e71e5f..594315b55b1f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1017,9 +1017,10 @@ static int vdec_close(struct file *file) mutex_destroy(&inst->lock); v4l2_fh_del(&inst->fh); v4l2_fh_exit(&inst->fh); - kfree(inst); pm_runtime_put_sync(inst->core->dev_dec); + + kfree(inst); return 0; }
This fixes the following compile error ocured when building with gcc7: drivers/media/platform/qcom/venus/vdec.c:1022 vdec_close() error: dereferencing freed memory 'inst' by moving kfree as a last call. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- drivers/media/platform/qcom/venus/vdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html