diff options
author | Dan Williams <dcbw@redhat.com> | 2010-10-06 23:09:06 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-10-06 23:09:06 -0500 |
commit | a9152f21ff40f4515237c40c691e2b87511b0c41 (patch) | |
tree | c40343e39cb66423d0ad3e1081fd4aa5ec7bee90 | |
parent | acc4541ab31196fa2b6bbc60997c6b0d7e93392e (diff) |
huawei: fix potential double-free on error (rh #632516)
-rw-r--r-- | plugins/mm-plugin-huawei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mm-plugin-huawei.c b/plugins/mm-plugin-huawei.c index 2993689d..eb141bfd 100644 --- a/plugins/mm-plugin-huawei.c +++ b/plugins/mm-plugin-huawei.c @@ -239,9 +239,6 @@ supports_port (MMPluginBase *base, 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)) { g_warning ("%s: (Huawei) %s: couldn't open serial port: (%d) %s", __func__, name, @@ -252,6 +249,9 @@ supports_port (MMPluginBase *base, 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; } |