flatpak / flatpak-xdg-utils

Simple portal-based commandline tools for use inside flatpak sandboxes
GNU Lesser General Public License v2.1
32 stars 14 forks source link

xdg-open: Start using autoptr to avoid leaks #45

Closed RyuzakiKK closed 3 years ago

RyuzakiKK commented 3 years ago

In xdg-open there are a lot of early returns and several variables were leaking.

To help cleaning variables before returning we can use the glib autoptr that has been already backported in "backport-autoptr.h".

I verified with valgrind that now there are no more "definitely" or "indirectly" leaks.