diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-04-24 14:51:50 -0400 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-04-24 14:58:38 -0400 |
commit | c42702cfc48e74d0d19a3d2f08049d2b5d0c85f4 (patch) | |
tree | a35e3a795087cb26180f783e94a71f0f53f2e8d4 | |
parent | f141b27bcb526d1cd95d3301775808c9b011dcfe (diff) |
bap: Fix use of unintialized variable
This fixes the following trace found with valgrind:
Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s)
at 0x5318B0E: setsockopt (in /usr/lib64/libc.so.6)
by 0x39C454: iso_set_qos (btio.c:899)
by 0x39C622: bt_io_set (btio.c:1900)
by 0x37F3B3: iso_do_big_sync (bap.c:2874)
by 0x3991EC: server_cb (btio.c:265)
by 0x3991EC: server_cb (btio.c:242)
by 0x496C4FB: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.7600.6)
by 0x49CA6B7: ??? (in /usr/lib64/libglib-2.0.so.0.7600.6)
by 0x496BAFE: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.7600.6)
by 0x4F9694: mainloop_run (mainloop-glib.c:66)
by 0x4F9B27: mainloop_run_with_signal (mainloop-notify.c:188)
by 0x2BE8F2: main (main.c:1464)
Address 0x1fff0004c1 is on thread 1's stack
in frame #2, created by bt_io_set (btio.c:1870)
-rw-r--r-- | profiles/audio/bap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index 485256ec95..8e4f4b311f 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -2853,6 +2853,7 @@ static void iso_do_big_sync(GIOChannel *io, void *user_data) iso_bc_addr.bc_num_bis = 1; /* Set the user requested QOS */ + memset(&qos, 0, sizeof(qos)); qos.bcast.big = setup->qos.bcast.big; qos.bcast.bis = setup->qos.bcast.bis; qos.bcast.sync_factor = setup->qos.bcast.sync_factor; |