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;
|
||||
ConnectContext *ctx;
|
||||
GError *error = NULL;
|
||||
g_autoptr(MbimMessage) response = NULL;
|
||||
guint32 session_id;
|
||||
MbimActivationState activation_state;
|
||||
@@ -693,9 +692,9 @@ check_disconnected_ready (MbimDevice *device,
|
||||
self = g_task_get_source_object (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 &&
|
||||
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 (
|
||||
response,
|
||||
&session_id,
|
||||
@@ -704,7 +703,7 @@ check_disconnected_ready (MbimDevice *device,
|
||||
NULL, /* ip_type */
|
||||
NULL, /* context_type */
|
||||
NULL, /* nw_error */
|
||||
&error)) {
|
||||
NULL)) {
|
||||
mm_obj_dbg (self, "session ID '%u': %s", session_id, mbim_activation_state_get_string (activation_state));
|
||||
} else
|
||||
activation_state = MBIM_ACTIVATION_STATE_UNKNOWN;
|
||||
|
Reference in New Issue
Block a user