Potential double free in v1.20.0
In file included from /usr/include/glib-2.0/glib.h:116,
from ../libmm-glib/mm-common-helpers.h:25,
from ../libmm-glib/libmm-glib.h:61,
from mm-iface-modem-3gpp-profile-manager.c:22:
In function ‘g_autoptr_cleanup_generic_gfree’,
inlined from ‘profile_manager_fail_if_connected_bearer’ at mm-iface-modem-3gpp-profile-manager.c:88:31:
/usr/include/glib-2.0/glib/glib-autocleanups.h:30:3: error: ‘apn_type_str’ may be used uninitialized [-Werror=maybe-uninitialized]
30 | g_free (*pp);
| ^~~~~~~~~~~~
mm-iface-modem-3gpp-profile-manager.c: In function ‘profile_manager_fail_if_connected_bearer’:
mm-iface-modem-3gpp-profile-manager.c:88:31: note: ‘apn_type_str’ was declared here
88 | g_autofree gchar *apn_type_str;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
g_autofree gchar *apn_type_str;
apn_type_str = mm_bearer_apn_type_build_string_from_mask (apn_type);
I think the problem comes from g_autofree
.