From patchwork Sun Jan 15 15:17:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9517497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30164607D4 for ; Sun, 15 Jan 2017 15:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 246B528496 for ; Sun, 15 Jan 2017 15:17:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1724528498; Sun, 15 Jan 2017 15:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCC3528496 for ; Sun, 15 Jan 2017 15:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbdAOPRU (ORCPT ); Sun, 15 Jan 2017 10:17:20 -0500 Received: from mout.web.de ([212.227.15.4]:50981 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbdAOPRT (ORCPT ); Sun, 15 Jan 2017 10:17:19 -0500 Received: from [192.168.1.2] ([78.49.147.199]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0ME0v1-1cDgeU109P-00HMwf; Sun, 15 Jan 2017 16:17:05 +0100 Subject: [PATCH 17/46] selinux: Delete an unnecessary variable assignment in filename_trans_read() To: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Eric Paris , James Morris , Paul Moore , "Serge E. Hallyn" , Stephen Smalley , William Roberts References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <71120ef7-6463-6497-f915-fcaf9e54239d@users.sourceforge.net> Date: Sun, 15 Jan 2017 16:17:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:CQ/V2oYUTNbOKVX4EIdc+0tcBtmLYVQUlJNHNCMVr9qIfdYE3eT yPX7+yLtUnkiMPGE8wHNqrJN+/JxBIL5hV7doPYiTKY1p22UeH1831M+yZZ63iORcHLIAUO YL7ULgDS6gEEEdbn2ycEUPtx4iE3hhuc/LguA/scDxdDYNbAWSj26KZ41tTPU1dJyneV6F6 I0ZwW/Ln3NOzynb9ewPJg== X-UI-Out-Filterresults: notjunk:1; V01:K0:X69pPR87qGo=:IFLd4JLKBgZ2beRml6i4LJ jhFz7+PGt/3QdBMY1slzFxZW57vtmdU/VyEh/NaV1CsF7s+i8VzdYqimJCvrCZOLiziVsZ5Bh kV1NU5Xm3GbFF28PfHMROBPk4KfWudvYG/1cS/RwUkrEVbYVEvJnqFJU8Ycm+QLL/N2AfwXOI /QESnX1/lkRSRY0YJze1cf6WJPm/j7hzlekfPlH6BqPTTwqYfOx36Kxl8EF+6qIPiirlhCHWU bj+yyOFynRVhHoRPzQJgCGni+Q0dOZIgR6OFJgEaRhDGDBHqM7+Sf2un2N1cVKYx/d9FF+oe1 LC0WlqeaREBQkDir/3tOGyD3j28OWJV6O9GbCtybPyljJHRf40PQmOfeN931NpjeancwsUMIo WW7gzfGZwP4aXTBCcazQDNqZGbCtuakBj/XbOFRVzFYFTTVNvUD52sY5YB83pCarz/x4KCbS7 m33obf7QxfHCSlQ6wxOtZGh7U9FQXUlOVInfWRBaWBGaoB+9gjP4XNkkP4HZPp2H97bSSn3lj VeSRTvJH+E5uQ8d0f1cr8dlzgVvSWHG9ibgfu/i6TtFIcCIKiVR2mOOIh6LXijWlLhoJMh8QN CwvRQL2bSDJRLMM+cy+DJHc7K0I1Qr710FBjZzg7JwLyGOfY3UjsQDEJAS0zxzP5GMS+eikOR eWlyR6Sh5ZuIvtGO+A9qBEbbXmGN+CQ8/9PISigvjJlgLmVlvtTuMCGBAGbGUcZl4OnhuO4gB HplV+7WDmfGZdxVzTdXL93mRyfo14HffqykVG+CxKr42ghE7Jb2Yy5GKDzvTdE3FV4EwSGBc3 EIe3MYX Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 14 Jan 2017 19:02:42 +0100 The local variable "ft" was set to a null pointer despite of an immediate reassignment. Thus remove this statement from the beginning of a loop. Signed-off-by: Markus Elfring --- security/selinux/ss/policydb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 106a1da1d68a..2be5b18eb149 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1927,7 +1927,6 @@ static int filename_trans_read(struct policydb *p, void *fp) nel = le32_to_cpu(buf[0]); for (i = 0; i < nel; i++) { - ft = NULL; otype = NULL; name = NULL; ft = kzalloc(sizeof(*ft), GFP_KERNEL);