mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-01 19:40:44 +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)
This commit is contained in:
parent
9c3e6a1034
commit
d26f17f24c
1 changed files with 5 additions and 5 deletions
|
|
@ -369,10 +369,10 @@ static void
|
|||
connect_ready(MMModemSimple *simple_iface, GAsyncResult *res, NMModemBroadband *self)
|
||||
{
|
||||
ConnectContext *ctx;
|
||||
GError * error = NULL;
|
||||
NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
MMBearer * bearer;
|
||||
GError * error = NULL;
|
||||
NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||
gs_unref_object MMBearer *bearer = NULL;
|
||||
|
||||
bearer = mm_modem_simple_connect_finish(simple_iface, res, &error);
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ connect_ready(MMModemSimple *simple_iface, GAsyncResult *res, NMModemBroadband *
|
|||
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