From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dggrg01-dlp.huawei.com (unknown [45.249.212.187]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8DB3C80468 for ; Wed, 22 Mar 2017 19:44:39 -0700 (PDT) Received: from 172.30.72.57 (EHLO DGGEMA402-HUB.china.huawei.com) ([172.30.72.57]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALE63824; Thu, 23 Mar 2017 10:44:34 +0800 (CST) Received: from DGGEMA505-MBS.china.huawei.com ([169.254.4.120]) by DGGEMA402-HUB.china.huawei.com ([10.3.20.43]) with mapi id 14.03.0301.000; Thu, 23 Mar 2017 10:44:30 +0800 From: Guoheyi To: "edk2-devel@lists.01.org" CC: Feng Tian , Star Zeng Thread-Topic: [edk2] [MdeModulePkg/Ip4Dxe] Is it a bug in Ip4Input.c? Thread-Index: AdKjf2SzCjN4RAAEQhKLq7Zro+AaVg== Date: Thu, 23 Mar 2017 02:44:30 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.31.55] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090206.58D33692.0078, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.4.120, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: ffff31a2b5bed97252403cfbb5d16e17 Subject: [MdeModulePkg/Ip4Dxe] Is it a bug in Ip4Input.c? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 02:44:41 -0000 Content-Language: zh-CN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi folks, In MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Inpu.c, line #666~672, temporar= y variable Packet is set but not used, nor it is referred by any event. Is = it a bug or just something useless? 666 if (Packet =3D=3D NULL) { 667 Packet =3D IpSecWrap->Packet; // Packet is set here, bu= t not used any more. 668 gBS->SignalEvent (RecycleEvent); 669 FreePool (IpSecWrap); 670 Status =3D EFI_OUT_OF_RESOURCES; 671 goto ON_EXIT; // function will return on O= N_EXIT 672 } Please advise. Thanks and regards, Gary (Heyi Guo)