]> git.ipfire.org Git - thirdparty/grub.git/commit
commands/hashsum: Fix a memory leak
authorChris Coulson <chris.coulson@canonical.com>
Tue, 1 Dec 2020 23:41:24 +0000 (23:41 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:17 +0000 (15:54 +0100)
commit8b6f528e52e18b7a69f90b8dc3671d7b1147d9f3
treeb1df68912d0094477cf94318950635a6267e2e5a
parent9213575b7a95b514bce80be5964a28d407d7d56d
commands/hashsum: Fix a memory leak

check_list() uses grub_file_getline(), which allocates a buffer.
If the hash list file contains invalid lines, the function leaks
this buffer when it returns an error.

Fixes: CID 176635
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/hashsum.c