From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752509AbbHURNR (ORCPT ); Fri, 21 Aug 2015 13:13:17 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35023 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbbHURNL (ORCPT ); Fri, 21 Aug 2015 13:13:11 -0400 Date: Fri, 21 Aug 2015 10:11:27 -0700 From: Olof Johansson To: Christian Engelmayer Cc: lee.jones@linaro.org, gwendal@chromium.org, wfrichar@chromium.org, smbarber@chromium.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store() Message-ID: <20150821171127.GF26236@localhost> References: <1437334982-3388-1-git-send-email-cengelma@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437334982-3388-1-git-send-email-cengelma@gmx.at> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 19, 2015 at 09:43:02PM +0200, Christian Engelmayer wrote: > Function led_rgb_store() contains some direct returns in error cases that > leak the already allocated cros_ec_command message structure. Make sure > that 'msg' is freed in all exit paths. Detected by Coverity CID 1309666. > > Signed-off-by: Christian Engelmayer > --- > Compile tested only. Applies against linux-next. Applied with adjusted patch subject. -Olof