Darren Kenny 178ac51073 affs: Fix memory leaks
The node structure reference is being allocated but not freed if it
reaches the end of the function. If any of the hooks had returned
a non-zero value, then node would have been copied in to the context
reference, but otherwise node is not stored and should be freed.

Similarly, the call to grub_affs_create_node() replaces the allocated
memory in node with a newly allocated structure, leaking the existing
memory pointed by node.

Finally, when dir->parent is set, then we again replace node with newly
allocated memory, which seems unnecessary when we copy in the values
from dir->parent immediately after.

Fixes: CID 73759

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2021-03-02 15:54:16 +01:00
..
2021-03-02 15:54:16 +01:00
2011-10-30 16:10:18 +01:00
2015-07-27 13:19:02 +02:00
2019-04-09 10:03:29 +10:00
2011-04-11 18:13:00 +02:00
2020-03-10 21:52:07 +01:00
2020-07-29 16:55:47 +02:00
2011-04-11 08:16:13 +02:00
2019-04-09 10:03:29 +10:00
2020-07-29 16:55:47 +02:00
2019-04-09 10:03:29 +10:00
2019-04-09 10:03:29 +10:00
2020-07-29 16:55:47 +02:00
2020-07-29 16:55:48 +02:00
2010-05-06 11:34:04 +05:30
2012-12-08 20:56:58 +01:00
2019-04-09 10:03:29 +10:00