Good comment. -----Original Message----- From: Leif Lindholm [mailto:[email protected]] Sent: Thursday, August 27, 2015 6:58 AM To: Qiu, Shumin Cc: [email protected]; Carsey, Jaben Subject: Re: [edk2] [PATCH] ShellPkg: Fix the ASSERT issue in drvcfg command.
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 <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Qiu Shumin <[email protected]> > --- > 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 > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

