huawei: fix potential double-free on error (rh #632516)
This commit is contained in:
@@ -239,9 +239,6 @@ supports_port (MMPluginBase *base,
|
|||||||
|
|
||||||
info->id = g_timeout_add_seconds (7, probe_secondary_timeout, task);
|
info->id = g_timeout_add_seconds (7, probe_secondary_timeout, task);
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (task), TAG_SUPPORTS_INFO,
|
|
||||||
info, huawei_supports_info_destroy);
|
|
||||||
|
|
||||||
if (!mm_serial_port_open (MM_SERIAL_PORT (info->serial), &error)) {
|
if (!mm_serial_port_open (MM_SERIAL_PORT (info->serial), &error)) {
|
||||||
g_warning ("%s: (Huawei) %s: couldn't open serial port: (%d) %s",
|
g_warning ("%s: (Huawei) %s: couldn't open serial port: (%d) %s",
|
||||||
__func__, name,
|
__func__, name,
|
||||||
@@ -252,6 +249,9 @@ supports_port (MMPluginBase *base,
|
|||||||
return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
|
return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_object_set_data_full (G_OBJECT (task), TAG_SUPPORTS_INFO,
|
||||||
|
info, huawei_supports_info_destroy);
|
||||||
|
|
||||||
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
|
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user