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.
This commit is contained in:
Tanu Kaskinen 2012-03-22 12:23:13 +02:00 committed by Tanu Kaskinen
parent f36148a82e
commit 9f832ca565

View file

@ -2626,9 +2626,6 @@ void pa__done(pa_module *m) {
if (u->card) if (u->card)
pa_card_free(u->card); pa_card_free(u->card);
if (u->read_smoother)
pa_smoother_free(u->read_smoother);
if (u->a2dp.buffer) if (u->a2dp.buffer)
pa_xfree(u->a2dp.buffer); pa_xfree(u->a2dp.buffer);