From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932601AbeBVNmo (ORCPT ); Thu, 22 Feb 2018 08:42:44 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:56814 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932356AbeBVNmm (ORCPT ); Thu, 22 Feb 2018 08:42:42 -0500 Date: Thu, 22 Feb 2018 21:42:31 +0800 From: Herbert Xu To: SF Markus Elfring Cc: linux-crypto@vger.kernel.org, Arvind Yadav , Colin Ian King , "David S. Miller" , Rob Rice , Steve Lin , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH 2/2] crypto: bcm: One function call less in do_shash() after error detection Message-ID: <20180222134231.GC28447@gondor.apana.org.au> References: <68946b12-83d6-ab74-fd54-71b23cf9b7ef@users.sourceforge.net> <55bdcf76-f1c9-180d-6798-959e617b10ac@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55bdcf76-f1c9-180d-6798-959e617b10ac@users.sourceforge.net> 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 Wed, Feb 14, 2018 at 10:40:26PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 14 Feb 2018 22:22:20 +0100 > > The kfree() function was called in one case by the do_shash() function > during error handling even if the passed variable contained a null pointer. > > * Reorder two function calls at the end. > > * Add a jump target. This patch is pointless as kfree on NULL is a no-op. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt