Re: [edk2] [PATCH v2 3/4] ShellPkg: Fix memory leak in ShellProtocol.

2015-12-22 Thread Ni, Ruiyu
Shumin, You need to add "ShellInfoNode->Handle = NULL" after "EfiShellClose" otherwise "EfiShellFreeFileList" in line 2372 may hang on closing the file again. >Status = ShellSearchHandle(NextFilePatternStart, > UnicodeCollation, ShellInfoNode->Handle, FileList, ShellInfoNode,

Re: [edk2] [PATCH v2 3/4] ShellPkg: Fix memory leak in ShellProtocol.

2015-12-21 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Qiu, Shumin > Sent: Monday, December 21, 2015 7:19 AM > To: edk2-devel@lists.01.org > Cc: Qiu, Shumin ; Carsey, Jaben > ; Ni, Ruiyu > Subject:

[edk2] [PATCH v2 3/4] ShellPkg: Fix memory leak in ShellProtocol.

2015-12-21 Thread Qiu Shumin
1. Close unused file handle. 2. Free the local allocated buffer function returned. Cc: Jaben Carsey Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin Reviewed-by: Ruiyu Ni