From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbdEET5P (ORCPT ); Fri, 5 May 2017 15:57:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41866 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbdEET44 (ORCPT ); Fri, 5 May 2017 15:56:56 -0400 Date: Fri, 5 May 2017 12:56:47 -0700 From: Greg KH To: Christophe JAILLET Cc: thierry.escande@collabora.com, wnhuang@google.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] firmware: Google VPD: Fix memory allocation error handling Message-ID: <20170505195647.GB7351@kroah.com> References: <20170505190844.2945-1-christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170505190844.2945-1-christophe.jaillet@wanadoo.fr> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 05, 2017 at 09:08:44PM +0200, Christophe JAILLET wrote: > This patch fixes several issues: > - if the 1st 'kzalloc' fails, we dereference a NULL pointer > - if the 2nd 'kzalloc' fails, there is a memory leak > - if 'sysfs_create_bin_file' fails there is also a memory leak Then it should be multiple patches, not fixing 3 things in one patch, right? thanks, greg k-h