Hi,

On Wed, Aug 26, 2015 at 10:45:35AM +0800, Qiu Shumin wrote:
> Initialize the local pointer to avoid to free a dangling pointer.
> 
> Cc: Jaben Carsey <jaben.car...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Qiu Shumin <shumin....@intel.com>
> ---
>  ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c 
> b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
> index 27b8873..b2ba8ff 100644
> --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
> +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
> @@ -1181,6 +1181,8 @@ ShellCommandRunDrvCfg (
>    Status = CommandInit();
>    ASSERT_EFI_ERROR(Status);
>  
> +  ProblemParam = NULL;
> +

Would it make sense to move this to the other variable
initializations - immediately after
  UseHii              = TRUE;
?

>    //
>    // parse the command line
>    //
> -- 
> 1.9.5.msysgit.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to