share/bap: Fix not removing timeout on bap_free
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 24 Apr 2023 23:30:31 +0000 (16:30 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:41:34 +0000 (16:11 +0530)
commit3565faea360e3d76f7fba6e0a606149555bc4012
treeb65f4293163898a021ea291368a95b3ebd53cfe1
parent5ebdaad1fefef9c6c36a23bfc0398befe3fdcf8c
share/bap: Fix not removing timeout on bap_free

This fixes not removing the process_id timeout when freeing the session
which can cause the following crash:

Invalid read of size 8
  at 0x18EB39: bap_debug (bap.c:553)
  by 0x1913A8: bap_process_queue (bap.c:3542)
  by 0x1A8630: timeout_callback (timeout-glib.c:25)
Address 0x55e0650 is 128 bytes inside a block of size 160 free'd
  at 0x48480E4: free (vg_replace_malloc.c:872)
src/shared/bap.c