Memory leak in the BootManager code

Konstantin Aladyshev


I have a question about dynamic content generation in the form
Usually such content is generated with the help of labels on the
EFI_BROWSER_ACTION_FORM_OPEN action. Example is the BootManager form.

The thing that I want to discuss is that strings for the generated
elements are produced via the `HiiSetString(HiiHandle, 0, <Text>,
NULL)` calls.
But if we use 0 as the second argument, this would produce new string
packages every time we enter the BootManager form. Isn't it a memory


BootManagerCallback() calls UpdateBootManager() on each form open
which creates new strings via:
Token = HiiSetString (HiiHandle, 0, BootOption[Index].Description, NULL);
HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);

Best regards,
Konstantin Aladyshev