btd_device should not be used after local reference was dropped. --- audio/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/device.c b/audio/device.c index 175e3c0..be63031 100644 --- a/audio/device.c +++ b/audio/device.c @@ -98,8 +98,6 @@ static void device_free(struct audio_device *dev) { struct dev_priv *priv = dev->priv; - btd_device_unref(dev->btd_dev); - if (priv) { if (priv->control_timer) g_source_remove(priv->control_timer); @@ -117,6 +115,8 @@ static void device_free(struct audio_device *dev) g_free(priv); } + btd_device_unref(dev->btd_dev); + g_free(dev->path); g_free(dev); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html