bearer-mbim: fix several leaked 'MbimMessage' objects
mbim_device_command_finish() returns always a new reference to the response.
This commit is contained in:
@@ -404,6 +404,9 @@ ip_configuration_query_ready (MbimDevice *device,
|
||||
g_free (ipv6dnsserver);
|
||||
}
|
||||
|
||||
if (response)
|
||||
mbim_message_unref (response);
|
||||
|
||||
if (error) {
|
||||
g_simple_async_result_take_error (ctx->result, error);
|
||||
connect_context_complete_and_free (ctx);
|
||||
@@ -462,6 +465,9 @@ connect_set_ready (MbimDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
if (response)
|
||||
mbim_message_unref (response);
|
||||
|
||||
if (error) {
|
||||
g_simple_async_result_take_error (ctx->result, error);
|
||||
connect_context_complete_and_free (ctx);
|
||||
@@ -515,6 +521,9 @@ provisioned_contexts_query_ready (MbimDevice *device,
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
if (response)
|
||||
mbim_message_unref (response);
|
||||
|
||||
/* Keep on */
|
||||
ctx->step++;
|
||||
connect_context_step (ctx);
|
||||
@@ -571,6 +580,9 @@ packet_service_set_ready (MbimDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
if (response)
|
||||
mbim_message_unref (response);
|
||||
|
||||
if (error) {
|
||||
/* Don't make NoDeviceSupport errors fatal; just try to keep on the
|
||||
* connection sequence even with this error. */
|
||||
@@ -956,6 +968,9 @@ disconnect_set_ready (MbimDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
if (response)
|
||||
mbim_message_unref (response);
|
||||
|
||||
if (error) {
|
||||
g_simple_async_result_take_error (ctx->result, error);
|
||||
disconnect_context_complete_and_free (ctx);
|
||||
|
||||
Reference in New Issue
Block a user