fix: use-after-free in getSystemInstalledFlatpakAppRefs
This fixes a use-after-free error in the kcm_flatpak system settings
panel, which is detectable by valgrind and also causes a crash when run
with hardened_malloc. The issue is that g_ptr_array_extend_and_steal
frees the GPtrArray *refs
passed to it, which conflicts with the
automatic pointer management done by g_autoptr
.