]> git.ipfire.org Git - thirdparty/grub.git/commit
net/tftp: Fix dangling memory pointer
authorDarren Kenny <darren.kenny@oracle.com>
Fri, 19 Feb 2021 17:12:23 +0000 (17:12 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:16 +0000 (15:54 +0100)
commit0cb838b281a68b536a09681f9557ea6a7ac5da7a
tree034152c3cede74e3abe13c4554251bf9e158127d
parent03f2515ae0c503406f1a99a2178405049c6555db
net/tftp: Fix dangling memory pointer

The static code analysis tool, Parfait, reported that the valid of
file->data was left referencing memory that was freed by the call to
grub_free(data) where data was initialized from file->data.

To ensure that there is no unintentional access to this memory
referenced by file->data we should set the pointer to NULL.

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/tftp.c