grub2/grub-core/normal
Darren Kenny 9213575b7a normal/completion: Fix leaking of memory when processing a completion
It is possible for the code to reach the end of the function without
freeing the memory allocated to argv and argc still to be 0.

We should always call grub_free(argv). The grub_free() will handle
a NULL argument correctly if it reaches that code without the memory
being allocated.

Fixes: CID 96672

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2021-03-02 15:54:17 +01:00
..
auth.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
autofs.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
charset.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
cmdline.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
color.c Replace explicit sizeof divisions by ARRAY_SIZE. 2015-01-21 17:37:31 +01:00
completion.c normal/completion: Fix leaking of memory when processing a completion 2021-03-02 15:54:17 +01:00
context.c normal: fix memory leak 2015-06-20 23:38:19 +03:00
crypto.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
dyncmd.c verifiers: File type for fine-grained signature-verification controlling 2018-11-09 13:25:31 +01:00
main.c normal/main: Search for specific config files for netboot 2020-02-18 15:12:06 +01:00
menu_entry.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
menu_text.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
menu.c kern/term: Accept ESC, F4 and holding SHIFT as user interrupt keys 2020-04-21 22:13:44 +02:00
misc.c disk: Rename grub_disk_get_size() to grub_disk_native_sectors() 2020-12-12 01:19:03 +01:00
term.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00