Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938749AbcKLC30 (ORCPT ); Fri, 11 Nov 2016 21:29:26 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:34113 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938605AbcKLC3X (ORCPT ); Fri, 11 Nov 2016 21:29:23 -0500 MIME-Version: 1.0 X-Originating-IP: [96.230.190.88] In-Reply-To: <1478854120-25311-1-git-send-email-shailendra.v@samsung.com> References: <1478854120-25311-1-git-send-email-shailendra.v@samsung.com> From: Paul Moore Date: Fri, 11 Nov 2016 21:29:21 -0500 Message-ID: Subject: Re: [PATCH] Security: selinux - Improvement in code readability when To: Shailendra Verma Cc: Stephen Smalley , Eric Paris , James Morris , "Serge E. Hallyn" , selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Shailendra Verma , vidushi.koul@samsung.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 601 Lines: 20 On Fri, Nov 11, 2016 at 3:48 AM, Shailendra Verma wrote: > From: "Shailendra Verma" > > There is no need to call kfree() if memdup_user() fails, as no memory > was allocated and the error in the error-valued pointer should be returned. > > Signed-off-by: Shailendra Verma > --- > security/selinux/selinuxfs.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Hello Shailendra, Thank you for your patch, but I prefer the readability of the code as it currently stands. -- paul moore www.paul-moore.com