From 9f832ca565f1c73d0bfec389314f1ece9d2b4424 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Thu, 22 Mar 2012 12:23:13 +0200 Subject: [PATCH] bluetooth: Don't free read_smoother in pa__done(). pa__done() calls stop_thread(), and stop_thread() already frees the smoother. The duplicate freeing is not strictly a bug, but static analyzers (in this case Coverity) may complain about double-freeing, because when pa__done() "frees" the smoother (which doesn't actually ever happen), the pointer is not nulled. pa__done() then calls bt_transport_release(), which will also free the smoother if it's not NULL. The analyzer complaint could be silenced also by nulling the pointer in pa__done(), but since this is clearly redundant code, I chose to remove it. --- src/modules/bluetooth/module-bluetooth-device.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 7b956086a..6962c7a91 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -2626,9 +2626,6 @@ void pa__done(pa_module *m) { if (u->card) pa_card_free(u->card); - if (u->read_smoother) - pa_smoother_free(u->read_smoother); - if (u->a2dp.buffer) pa_xfree(u->a2dp.buffer);