Fix coverity scan issue: uninitialized scalar variable
[Description] Issue type: uninitialized scalar variable [Root Cause] In function bta_av_rc_msg(), av.remote_rsp.len and av.remote_rsp.p_data are uninitialized if this VENDOR cmd is not implemented by peer. While in function handle_rc_vendorunique_rsp(), p_remote_rsp->len may be greater than 0 and call osi_free_and_reset() [Solution] Initialize the len and p_data. Adding code to judge this case, avoid free null pointer. Bug: 270276349 Test: atest net_test_btif_rc pass Test: atest net_test_stack pass Change-Id: Ic3aa23b4e5c17147f5c2d489abb0da43aa5561ce
Loading
Please register or sign in to comment