wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
313 stars 15 forks source link

gtk_wayland_get_logical_geom leaks memory? #128

Closed LBCrion closed 2 years ago

LBCrion commented 2 years ago

valgrind is showing a memory leak when popup windows are open on a gtk-layer-shell linked application. Digging down, it looking like gtk_wayland_get_logical_geom in src/gtk_wayland.c needs to call g_list_free(list) before returning.

Documentation for gdk_window_get_children says: "The returned list must be freed, but the elements in the list need not be."

wmww commented 2 years ago

Yep, that would be a memory leak all right

wmww commented 2 years ago

Since it's only leaking a tiny amount of memory per-popup, I don't think this is such a priority that it needs a release right away.

LBCrion commented 2 years ago

Thank you! And indeed, I don't think this is severe enough to warrant an immediate release. Glad to see it fixed though. It was a splinter in my mind for months: I kept looking for a leak in my menu generating code. Should have run valgrind on it long ago.