mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-21 13:50:34 +00:00
![]() There are several exit points in dnode_get_path() that are causing possible memory leaks. In the while(1) the correct exit mechanism should not be to do a direct return, but to instead break out of the loop, setting err first if it is not already set. The reason behind this is that the dnode_path is a linked list, and while doing through this loop, it is being allocated and built up - the only way to correctly unravel it is to traverse it, which is what is being done at the end of the function outside of the loop. Several of the existing exit points correctly did a break, but not all so this change makes that more consistent and should resolve the leaking of memory as found by Coverity. Fixes: CID 73741 Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@canonical.com> Signed-off-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
.. | ||
zfs_fletcher.c | ||
zfs_lz4.c | ||
zfs_lzjb.c | ||
zfs_sha256.c | ||
zfs.c | ||
zfscrypt.c | ||
zfsinfo.c |