Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbdLLWYD (ORCPT ); Tue, 12 Dec 2017 17:24:03 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:46965 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752320AbdLLWYB (ORCPT ); Tue, 12 Dec 2017 17:24:01 -0500 Date: Tue, 12 Dec 2017 23:23:59 +0100 From: Alexandre Belloni To: Colin King Cc: Alessandro Zummo , Maxime Ripard , Chen-Yu Tsai , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: sun6i: ensure rtc is kfree'd on error Message-ID: <20171212222359.GM8318@piout.net> References: <20171122171618.2460-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171122171618.2460-1-colin.king@canonical.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 595 Lines: 20 On 22/11/2017 at 17:16:18 +0000, Colin King wrote: > From: Colin Ian King > > The error return path on clk_data allocation failure does not kfree > the allocated rtc object. Fix this with a kfree of rtc on the error > exit path. > > Detected by CoverityScan, CID#1452264 ("Resource Leak") > > Signed-off-by: Colin Ian King > --- > drivers/rtc/rtc-sun6i.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com