mattepiu Thank you. I am a bit out of time recently and I won't be able to check the memory leak soon. The good-ish news is that the leak is also present in official Kodi Krypton builds for aarach64 and hopefully someone more skilled than me would be able to find the reason sooner. Also, for debugging you would need a debug build, with debug symbols not stripped.
TYVM, I'm not finding any option to create image with symbols, so I think I'll just copy all kodi binaries from the .install_pkg sysroot in my dev image. I hope this will be enough.