From patchwork Sun Jan 30 10:05:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Krause X-Patchwork-Id: 517381 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0UAGAdp015367 for ; Sun, 30 Jan 2011 10:16:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855Ab1A3KQI (ORCPT ); Sun, 30 Jan 2011 05:16:08 -0500 Received: from grimli.r00tworld.net ([83.169.44.195]:44680 "EHLO mail.r00tworld.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400Ab1A3KQH (ORCPT ); Sun, 30 Jan 2011 05:16:07 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 30 Jan 2011 10:16:32 +0000 (UTC) X-Greylist: delayed 608 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Jan 2011 05:16:07 EST Received: by mail.r00tworld.net (Postfix, from userid 1000) id 1D568115901E2; Sun, 30 Jan 2011 11:05:58 +0100 (CET) From: Mathias Krause To: linux-media@vger.kernel.org Cc: Janusz Krzysztofik , Mauro Carvalho Chehab , Mathias Krause Subject: [PATCH] [media] OMAP1: fix use after free Date: Sun, 30 Jan 2011 11:05:58 +0100 Message-Id: <1296381958-15760-1-git-send-email-minipli@googlemail.com> X-Mailer: git-send-email 1.5.6.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/omap1_camera.c b/drivers/media/video/omap1_camera.c index 0a2fb2b..9ed1513 100644 --- a/drivers/media/video/omap1_camera.c +++ b/drivers/media/video/omap1_camera.c @@ -1664,10 +1664,10 @@ static int __exit omap1_cam_remove(struct platform_device *pdev) res = pcdev->res; release_mem_region(res->start, resource_size(res)); - kfree(pcdev); - clk_put(pcdev->clk); + kfree(pcdev); + dev_info(&pdev->dev, "OMAP1 Camera Interface driver unloaded\n"); return 0;