Fixed memory leak.
This was found by repeated connecting and disconnecting bluetooth.