bearer-mbim: plug leak when checking if already disconnected fails
If the modem reports any error during the connection status check, we're creating a GError but never disposing it. We don't need that GError for anything, so just discard it.
This commit is contained in:
@@ -685,7 +685,6 @@ check_disconnected_ready (MbimDevice *device,
|
|||||||
{
|
{
|
||||||
MMBearerMbim *self;
|
MMBearerMbim *self;
|
||||||
ConnectContext *ctx;
|
ConnectContext *ctx;
|
||||||
GError *error = NULL;
|
|
||||||
g_autoptr(MbimMessage) response = NULL;
|
g_autoptr(MbimMessage) response = NULL;
|
||||||
guint32 session_id;
|
guint32 session_id;
|
||||||
MbimActivationState activation_state;
|
MbimActivationState activation_state;
|
||||||
@@ -693,9 +692,9 @@ check_disconnected_ready (MbimDevice *device,
|
|||||||
self = g_task_get_source_object (task);
|
self = g_task_get_source_object (task);
|
||||||
ctx = g_task_get_task_data (task);
|
ctx = g_task_get_task_data (task);
|
||||||
|
|
||||||
response = mbim_device_command_finish (device, res, &error);
|
response = mbim_device_command_finish (device, res, NULL);
|
||||||
if (response &&
|
if (response &&
|
||||||
mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error) &&
|
mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, NULL) &&
|
||||||
mbim_message_connect_response_parse (
|
mbim_message_connect_response_parse (
|
||||||
response,
|
response,
|
||||||
&session_id,
|
&session_id,
|
||||||
@@ -704,7 +703,7 @@ check_disconnected_ready (MbimDevice *device,
|
|||||||
NULL, /* ip_type */
|
NULL, /* ip_type */
|
||||||
NULL, /* context_type */
|
NULL, /* context_type */
|
||||||
NULL, /* nw_error */
|
NULL, /* nw_error */
|
||||||
&error)) {
|
NULL)) {
|
||||||
mm_obj_dbg (self, "session ID '%u': %s", session_id, mbim_activation_state_get_string (activation_state));
|
mm_obj_dbg (self, "session ID '%u': %s", session_id, mbim_activation_state_get_string (activation_state));
|
||||||
} else
|
} else
|
||||||
activation_state = MBIM_ACTIVATION_STATE_UNKNOWN;
|
activation_state = MBIM_ACTIVATION_STATE_UNKNOWN;
|
||||||
|
Reference in New Issue
Block a user