core: fix possible double-free
If there was data waiting, the task freed it, but then the port got closed, and the data callback might have freed the data again.
This commit is contained in:
@@ -370,8 +370,6 @@ supports_task_dispose (GObject *object)
|
||||
g_object_unref (priv->port);
|
||||
g_free (priv->physdev_path);
|
||||
g_free (priv->driver);
|
||||
g_free (priv->probe_resp);
|
||||
g_clear_error (&(priv->probe_error));
|
||||
|
||||
for (iter = priv->custom; iter; iter = g_slist_next (iter)) {
|
||||
CustomInit *custom = iter->data;
|
||||
@@ -399,6 +397,8 @@ supports_task_dispose (GObject *object)
|
||||
|
||||
g_free (priv->probed_vendor);
|
||||
g_free (priv->probed_product);
|
||||
g_free (priv->probe_resp);
|
||||
g_clear_error (&(priv->probe_error));
|
||||
|
||||
G_OBJECT_CLASS (mm_plugin_base_supports_task_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user