travisvroman / kohi

A game engine made as part of the Kohi Game Engine series on YouTube (and Twitch!), where we make a game engine from the ground up using C and Vulkan.
https://kohiengine.com
Apache License 2.0
1.02k stars 97 forks source link

Free xcb_intern_atom_reply_t* in linux platform #228

Open caiovpsilveira opened 4 months ago

caiovpsilveira commented 4 months ago

https://github.com/travisvroman/kohi/blob/e529fd20a81d8b55c24a77635b815b0875eb810f/engine/src/platform/platform_linux.c#L276

Running with valgrind reports a leak caused by this. Checking the xcb header comment, it states that this should be freed by the caller.

caiovpsilveira commented 4 months ago

wm_delete_reply and wm_protocols_reply

caiovpsilveira commented 4 months ago

also on platform_shutdown is missing closing the xcb connection from the linux handle