mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-01 10:20:30 +01:00
wwan: fix leaking "bearer" in connect_ready()
Fixes:105ee6e5a9('device: fix crash by handling connection cancellation') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/669 (cherry picked from commit5747bdb8b8) (cherry picked from commit65e88671d6) (cherry picked from commitd26f17f24c)
This commit is contained in:
parent
8df18958ed
commit
6199287b47
1 changed files with 2 additions and 2 deletions
|
|
@ -358,7 +358,7 @@ connect_ready (MMModemSimple *simple_iface,
|
|||
GError *error = NULL;
|
||||
NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
MMBearer *bearer;
|
||||
gs_unref_object MMBearer *bearer = NULL;
|
||||
|
||||
bearer = mm_modem_simple_connect_finish (simple_iface, res, &error);
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ connect_ready (MMModemSimple *simple_iface,
|
|||
if (!ctx)
|
||||
return;
|
||||
|
||||
self->_priv.bearer = bearer;
|
||||
self->_priv.bearer = g_steal_pointer (&bearer);
|
||||
|
||||
if (!self->_priv.bearer) {
|
||||
if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue