mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 21:38:06 +02:00
device/wwan: fix leak of "error" variable in connect_ready()
Fixes: 105ee6e5a9 ('device: fix crash by handling connection cancellation')
This commit is contained in:
parent
105ee6e5a9
commit
ae21d851e8
1 changed files with 6 additions and 3 deletions
|
|
@ -341,15 +341,18 @@ connect_ready (MMModemSimple *simple_iface,
|
||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
NMModemBroadband *self)
|
NMModemBroadband *self)
|
||||||
{
|
{
|
||||||
ConnectContext *ctx = NULL;
|
ConnectContext *ctx;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||||
NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN;
|
||||||
|
MMBearer *bearer;
|
||||||
|
|
||||||
MMBearer *bearer = mm_modem_simple_connect_finish (simple_iface, res, &error);
|
bearer = mm_modem_simple_connect_finish (simple_iface, res, &error);
|
||||||
|
|
||||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||||
|
g_error_free (error);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ctx = self->_priv.ctx;
|
ctx = self->_priv.ctx;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue