Commit Graph

26521 Commits

Author SHA1 Message Date
Brian Gix
31690310c0 core: Fix signed vs unsigned compare
__time_t is not a portable data type, and can cause sign mismatch on
some compares.

Fixes:
  CC       src/bluetoothd-device.o
src/device.c: In function ‘device_is_name_resolve_allowed’:
src/device.c:4092:17: error: comparison of integer expressions of
different signedness: ‘__time_t’ {aka ‘long int’} and
‘long unsigned int’ [-Werror=sign-compare]
  if (now.tv_sec >= device->name_resolve_failed_time +
                 ^~
cc1: all warnings being treated as errors
2022-06-30 13:27:21 -07:00
Brian Gix
8fc3368db8 core: make bt_uuid_hash() portable across archs
bt_uuid_t is defined as a byte array, so it can cause alignment errors
on some architectures, when the two 64 bit halves are treated as u64s.
This patch ensures proper alignment across all architectures.

Fixes:
src/adapter.c: In function ‘bt_uuid_hash’:
src/adapter.c:3617:8: error: cast increases required alignment of
target type [-Werror=cast-align]
  val = (uint64_t *)&uuid_128.value.u128;
        ^
cc1: all warnings being treated as errors
2022-06-30 13:26:58 -07:00
lishengyu
44658fccac avdtp: fix possible minor problems
It should always be considered that if send_request fails, sep
should be removed from the list and the requested memory freed;
2022-06-30 13:26:10 -07:00
Isak Westin
be7ebf29b3 mesh: Use correct net_id for received CTL messages
For received CTL mesh messages, the wrong network ID variable was
passed to ctl_received. This patch changes to the correct variable.

Also, changed type of net_key_id argument in ctl_received function
to be consistent wich the whole call chain.
2022-06-30 13:18:06 -07:00
Szymon Janc
1d6cfb8e62 monitor: Fix crash when using RTT backend
This fix regression introduced by "monitor: Fix memory leaks".
J-Link shared library is in use if jlink_init() returns 0 and thus
handle shall not be closed.
2022-06-27 10:22:10 +02:00
Youwan Wang
65f7faf5a3 device: Fix not removing connected device
[bluetooth]# connect 40:EF:4C:0C:11:F0
Attempting to connect to 40:EF:4C:0C:11:F0
[CHG] Device 40:EF:4C:0C:11:F0 Connected: yes
Connection successful
[CHG] Device 40:EF:4C:0C:11:F0 ServicesResolved: yes
[UFO]# remove 40:EF:4C:0C:11:F0
[CHG] Device 40:EF:4C:0C:11:F0 ServicesResolved: no
Device has been removed
[CHG] Device 40:EF:4C:0C:11:F0 Connected: no
[bluetooth]# info 40:EF:4C:0C:11:F0
Device 40:EF:4C:0C:11:F0 (public)
        Name: UFO
        Alias: UFO
        Class: 0x00240418
        Icon: audio-headphones
        Paired: yes
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Headset
        UUID: Audio Sink
        UUID: A/V Remote Control Target
        UUID: A/V Remote Control
        UUID: Handsfree
        UUID: Phonebook Access Server
2022-06-23 16:25:54 -07:00
Tedd Ho-Jeong An
e3c92f1f78 mgmt-tester: Fix null dereference issue reported by scan-build
This patch fixes the null dereference reported by the scan-build.

tools/mgmt-tester.c:12025:28: warning: Access to field 'cap_len' results
in a dereference of a null pointer (loaded from variable 'rp')
[core.NullDereference]

        if (sizeof(rp->cap_len) + rp->cap_len != length) {
                                  ^~~~~~~~~~~
2022-06-23 16:24:57 -07:00
Luiz Augusto von Dentz
7f92f75e88 client/advertising: Fixes errors found by scan-build
This fixes the following errors:

client/advertising.c:129:4: warning: Value stored to 'n' is never read
[deadcode.DeadStores]
                        n = sizeof(str) - 1;
                        ^   ~~~~~~~~~~~~~~~
client/advertising.c:1012:25: warning: Dereference of null pointer
(loaded from variable 'min') [core.NullDereference]
        if (ad.min_interval != *min) {
                               ^~~~
2022-06-22 11:16:18 -07:00
Luiz Augusto von Dentz
33c96ca658 client/player: Fixes errors found by scan-build
This fixes the following errors:

client/player.c:1406:44: warning: Dereference of null pointer
[core.NullDereference]
        reply = endpoint_select_config_reply(msg, p->data.iov_base,
                                                  ^~~~~~~~~~~~~~~~
client/player.c:1866:2: warning: 3rd function call argument is an
uninitialized value [core.CallAndMessage]
        iov_append(&cfg->caps, data, len);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-22 11:09:04 -07:00
Luiz Augusto von Dentz
e4fd2dc5aa client/player: Enable acquiring multiple transports
This enables acquiring multiple transports simultaneously.
2022-06-22 11:00:55 -07:00
Tedd Ho-Jeong An
b8b3277ba3 tools/mgmt-tester: Add test case for scan response data is not updating
This patch adds a test case to test if the scan response data is updated
when the following scenarios are performed.

1. Add Extended Advertising Parameters Command
2. Add Extended Advertising Data Command w/ Scan Resp Data
3. Remove Advertising Command
4. Add Extended Advertising Parameters Command
5. Add Extended Advertising Data Command w/ Scan Resp Data
6. Host should set Scan Resp Data
2022-06-21 23:19:15 -07:00
Jonas Maes
71560e1286 mesh: Fix bug where bluetooth-meshd stops sending
When there is a backlog of mesh packets to be sent, the packet sender
Fix bug where bluetooth-meshd stops sending

When there is a backlog of mesh packets to be sent, the packet sender
incorrectly infers that the tx worker thread is already running
and therefore needn't be invoked. As a result, the mesh daemon will
sometimes stop broadcasting while there are still packets in the queue.
It will not resume broadcasting.

This patch will invoke the tx worker thread correctly in that case.

The logic to send packets at least twice when the transmitter is idle
was slightly modified accordingly, and should behave the same way as
before.
2022-06-21 13:18:16 -07:00
Chengyi
949898cc5e avdtp: Free discover when send_request returns error
When send_request returns an error, session->discover should
be released here, so that the next time the program enters
avdtp_discover, the -EBUSY error will not be returned.
2022-06-21 12:33:09 -07:00
Frédéric Danis
19ad4310c9 test-runner: Fix issues found by coverity 2022-06-17 16:18:32 -07:00
Tedd Ho-Jeong An
3075ff8fff tools/btmgmt: Add support Add Ext Adv command
This patch adds new command to support the following MGMT API:
 Add Extended Advertising Parameters Command
 Add Extended Advertising Data Command
2022-06-17 14:08:16 -07:00
Tedd Ho-Jeong An
2479a013a2 monitor: Update flag information for Extended Advertismement
This patch updates the missing flag details for Advertisement flags

@ MGMT Event: Command Complete (0x0001) plen 11
      Read Advertising Features (0x003d) plen 8
        Status: Success (0x00)
        Flags: 0x0001ffff
	...
          Unknown advertising flag (0x00010c00)
	...
2022-06-17 14:08:15 -07:00
Tedd Ho-Jeong An
7378408ed4 doc/mgmt-api: Update for Add Extended Advertisement Command
This patch aligns the input parameter for Add Extended Advertisement
command with actual data struct and add missing flag descriptions.
2022-06-17 14:08:12 -07:00
Luiz Augusto von Dentz
bf5a7c604f monitor/att: Add LTV deconding support for PAC/ASE
This adds decoding support for PAC/ASE attributes:

> ACL Data RX: Handle 42 flags 0x02 dlen 31
      Channel: 65 len 27 sdu 25 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Response (0x0b) len 24
        Value: 010600000000100301ff0002020302030305041e00f00000
          Number of PAC(s): 1
          PAC #0:
            Codec: LC3 (0x06)
            Codec Specific Capabilities #0: len 0x03 type 0x01
              Sampling Frequencies: 0x00ff
                8 Khz (0x0001)
                11.25 Khz (0x0002)
                16 Khz (0x0004)
                22.05 Khz (0x0008)
                24 Khz (0x0010)
                32 Khz (0x0020)
                44.1 Khz (0x0040)
                48 Khz (0x0080)
            Codec Specific Capabilities #1: len 0x02 type 0x02
              Frame Duration: 0x0003
                7.5 ms (0x01)
                10 ms (0x02)
            Codec Specific Capabilities #2: len 0x02 type 0x03
              Audio Channel Count: 0x03
                1 channel (0x01)
                2 channels (0x02)
            Codec Specific Capabilities #3: len 0x05 type 0x04
              Frame Length: 30 (0x001e) - 240 (0x00f0)
> ACL Data RX: Handle 42 flags 0x02 dlen 30
      Channel: 64 len 26 sdu 24 [PSM 39 mode Enhanced Credit (0x81)] {chan 0}
      ATT: Write Command (0x52) len 23
        Handle: 0x0036 Type: ASE Control Point (0x2bc6)
          Data: 010101020206000000000a02010302020103042800
            Opcode: Codec Configuration (0x01)
            Number of ASE(s): 1
            ASE: #0
            ASE ID: 0x01
            Target Latency: Balance Latency/Reliability (0x02)
            PHY: 0x02
            LE 2M PHY (0x02)
            Codec: LC3 (0x06)
            Codec Specific Configuration #0: len 0x02 type 0x01
            Sampling Frequency: 16 Khz (0x03)
            Codec Specific Configuration #1: len 0x02 type 0x02
            Frame Duration: 10 ms (0x01)
            Codec Specific Configuration #2: len 0x03 type 0x04
            Frame Length: 40 (0x0028)
2022-06-16 17:49:03 -07:00
Luiz Augusto von Dentz
2bdb79cf81 monitor/att: Add decoding support for PAC Audio Context
This adds decoding support for PAC Audio Context attributes:

> ACL Data RX: Handle 42 flags 0x02 dlen 9
      Channel: 65 len 5 sdu 3 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Request (0x0a) len 2
        Handle: 0x0026 Type: Supported Audio Contexts (0x2bce)
< ACL Data TX: Handle 42 flags 0x00 dlen 11
      Channel: 64 len 7 sdu 5 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Response (0x0b) len 4
        Value: ff0f0e00
        Handle: 0x0026 Type: Supported Audio Contexts (0x2bce)
            Sink Context: 0x0fff
              Unspecified (0x0001)
              Conversational (0x0002)
              Media (0x0004)
              Game (0x0008)
              Instructional (0x0010)
              Voice Assistants (0x0020)
              Live (0x0040)
              Sound Effects (0x0080)
              Notifications (0x0100)
              Ringtone (0x0200)
              Alerts (0x0400)
              Emergency alarm (0x0800)
            Source Context: 0x000e
              Conversational (0x0002)
              Media (0x0004)
              Game (0x0008)
2022-06-16 17:49:02 -07:00
Luiz Augusto von Dentz
5da3c0387b monitor/att: Add decoding support for PAC Sink/Source Location
This adds decoding support for PAC Sink/Source Location attributes:

> ACL Data RX: Handle 42 flags 0x02 dlen 9
      Channel: 65 len 5 sdu 3 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Request (0x0a) len 2
        Handle: 0x001a Type: Sink Audio Locations (0x2bca)
< ACL Data TX: Handle 42 flags 0x00 dlen 11
      Channel: 64 len 7 sdu 5 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Response (0x0b) len 4
        Value: 03000000
        Handle: 0x001a Type: Sink Audio Locations (0x2bca)
           Location: 0x00000003
              Front Left (0x00000001)
              Front Right (0x00000002)
2022-06-16 17:49:02 -07:00
Luiz Augusto von Dentz
c53cb7be2d monitor/att: Print attribute information on ATT_REQ_RSP
This prints the attribute information on ATT_REQ_RSP to make it easier
to identify to which handle the response is for:

> ACL Data RX: Handle 42 flags 0x02 dlen 9
      Channel: 65 len 5 sdu 3 [PSM 39 mode Enhanced Credit (0x81)] {chan 1}
      ATT: Read Response (0x0b) len 2
        Value: 0300
        Handle: 0x0030 Type: Source ASE (0x2bc5)
            ASE ID: 3
            State: Idle (0x00)
2022-06-16 17:49:01 -07:00
Luiz Augusto von Dentz
afc8c8f56f bluetoothd.rst: Document -K/--kernel option
This documents -K/--kernel experimental features options.
2022-06-14 14:55:00 -07:00
Luiz Augusto von Dentz
a5382ba2f0 main.conf: Split Kernel Experimental UUIDs from Experimental
This splits kernel experimental UUIDs from D-Bus Experimental interface
so they can be controlled indenpendetly.
2022-06-14 14:45:44 -07:00
Brian Gix
5cc08527c0 mesh: Fix keyring snprintf usage range checking
snprintf performs it's own range checking and returns a negative value
if string construction fails. Not checking the return value throws a
warning at compile time on GCC 12 and later. This patch removes
redundent range chacking and checks all snprintf return values.
2022-06-14 13:42:09 -07:00
Luiz Augusto von Dentz
0da5c68413 advertising: Fix attempting to set scan_rsp
BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2450

  • If extended advertising PDU types are being used (bit 4 = 0) then:
  The advertisement shall not be both connectable and scannable.

So instead this attempts to set name as part of Advertising Data rather
then setting it as Scan Response:

bluetoothctl> advertise.secondary 2M
bluetoothctl> advertise.name Intel-3
bluetoothctl> advertise on

< HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
        Handle: 0x01
        Properties: 0x0001
          Connectable
        Min advertising interval: 1280.000 msec (0x0800)
        Max advertising interval: 1280.000 msec (0x0800)
        Channel map: 37, 38, 39 (0x07)
        Own address type: Public (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)
        TX power: Host has no preference (0x7f)
        Primary PHY: LE 1M (0x01)
        Secondary max skip: 0x00
        Secondary PHY: LE 2M (0x02)
        SID: 0x00
        Scan request notifications: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 5
      LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1
        Status: Success (0x00)
        TX power (selected): 7 dbm (0x07)
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 4
        Handle: 0x01
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x00
@ MGMT Event: Command Complete (0x0001) plen 7
      Add Extended Advertising Parameters (0x0054) plen 4
        Status: Success (0x00)
        Instance: 1
        TX power: 7 dbm (0x07)
        Available adv data len: 31
        Available scan rsp data len: 31
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
        Status: Success (0x00)
@ MGMT Command: Add Extended Advertising Data (0x0055) plen 23
        Instance: 1
        Advertising data length: 12
        Name (complete): Intel-3
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        Scan response length: 0
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 16
        Handle: 0x01
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x0c
        Name (complete): Intel-3
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 4
        Handle: 0x01
        Operation: Complete scan response data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x00
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Enabled (0x01)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x01
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 2
        Status: Success (0x00)
@ MGMT Event: Command Complete (0x0001) plen 4
      Add Extended Advertising Data (0x0055) plen 1
        Status: Success (0x00)
        Instance: 1
2022-06-14 13:29:09 -07:00
Luiz Augusto von Dentz
ef14e6eaa7 monitor/att: Fix decoding for notifications 2022-06-13 17:44:25 -07:00
Luiz Augusto von Dentz
3fb4e1cca2 device: Add connectable flag to bearer state
This adds connectable flag to state so it can be used to detect which is
the last seen connectable bearer.
2022-06-13 17:44:16 -07:00
Luiz Augusto von Dentz
12d6fd9b9d mgmt-tester: Fix regression with tests failing to setup
This fixes the regression introduced by
ab31e2f7e8 which causes tests using
add_advertising_mgmt_cmd_arr:

Add Advertising - Success (Name+data+appear) Timed out
Add Ext Advertising - Success (Name+data+appear) Timed out
2022-06-13 12:48:43 -07:00
wangyouwan
c6d3bcf3d0 obexd: Fix callback->func =! NULL in the xfer_complete() func
xfer_complete (obex=0x557d242c8cf0, err=0x557d242ca470,
user_data=0x557d242ca300) at obexd/client/transfer.c:659
659     obexd/client/transfer.c:
(gdb) n
661     in obexd/client/transfer.c
(gdb) n
663     in obexd/client/transfer.c
(gdb) p callback->func
$1 = (transfer_callback_t) 0x0
(gdb) n
668     in obexd/client/transfer.c
(gdb) n
671     in obexd/client/transfer.c
(gdb) n
672     in obexd/client/transfer.c
(gdb) n
676     in obexd/client/transfer.c
(gdb) n
677     in obexd/client/transfer.c
(gdb) n
0x0000000000000000 in ?? ()
(gdb) s
Cannot find bounds of current function
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
2022-06-13 11:03:48 -07:00
Frédéric Danis
91a48af52e test-runner: Add udevd and trigger events
Kernel events should have been managed so the audio card is accessible
from PipeWire
2022-06-13 11:03:40 -07:00
Frédéric Danis
e20e7e0b05 test-runner: Add audio card support
With this commit audio daemons can detect an audio card with output and
input, allowing to test interaction between BlueZ and the audio daemon.
2022-06-13 11:03:40 -07:00
Frédéric Danis
096599c1ae doc/test-runner: Add audio config options
List the build options for an AC97 audio card necessary for test with
audio daemon.
2022-06-13 11:03:40 -07:00
Frédéric Danis
a7e2f05e02 test-runner: Add DBus session support
Audio daemons requests access to DBus session to start
2022-06-13 11:03:40 -07:00
Frédéric Danis
6e2066fdab btproxy: Allow to select multiple BT controllers
When running on a computer with a real Bluetooth controller (e.g. hci0) and
multiple emulators (e.g. hci1 and hci2) it isn't possible to use the
emulators with 2 test-runner vms.
If btproxy is started without index parameter the first test-runner will
use hci0, and btprox can't be started with multiple index parameters
(e.g. -i1 -i2).

This patch keeps the old beahvior when used without -i option, in this case
it will try to use the first controller available.
It also allows to select multiple controllers to be used by btproxy.
2022-06-13 11:03:29 -07:00
Pauli Virtanen
9c288dd23a a2dp: error return paths in a2dp_reconfig must free allocated setup 2022-06-13 10:52:28 -07:00
Pauli Virtanen
5f9d9a9a0b a2dp: disallow multiple SetConfiguration to same local SEP
Using the remote SEP SetConfiguration DBus API, it's possible to make
multiple remote endpoints use the same local SEP, if they are endpoints
from different connected devices. This is invalid: successful
configuration shall prevent a different device configuring the same SEP
(AVDTP v1.3 Sec. 5.3).  Moreover, this breaks the assumption in the
AVDTP code that each SEP has at most a single stream, and causes
misbehavior later on (subsequent transport acquires fail with EPERM).

Fix this by first checking the SEP is free before proceeding in the DBus
API call.  Also add a sanity check in avdtp_set_configuration, to reject
configuring an already configured SEP similarly as in avdtp_setconf_cmd.
2022-06-13 10:52:26 -07:00
Luiz Augusto von Dentz
25dd5613d5 monitor: Stop spamming logs when GATT db cannot be loaded
This stops calling hci_devba everytime the GATT db needs to be loaded
since that causes a raw socket to be open to read back the address
pointed by the index, instead this is done only once at assign_handle
and store in packet_conn_data.
2022-06-13 10:20:33 -07:00
Marcel Holtmann
60f18a6894 mesh: Fix issue with snprintf return value check and format-truncation error 2022-06-10 19:55:13 +02:00
Michael Brudevold
3c7413f49c doc/coding-style: Update URL to kernel coding style 2022-06-09 21:12:11 -07:00
Tedd Ho-Jeong An
5ebc2b5a3e device: Fix not deleting the folder after removing the device
This patch fixes the issue not deleting the device folder when the
device is removed.
2022-06-09 20:49:36 -07:00
Luiz Augusto von Dentz
ab31e2f7e8 mgmt-tester: Fix build error
This fixes the following build error:

CC    tools/mgmt-tester.o
tools/mgmt-tester.c: In function ‘setup_command_generic’:
tools/mgmt-tester.c:7503:16: error: the comparison will always evaluate
as ‘true’ for the pointer operand in
‘(const struct setup_mgmt_cmd *)test->setup_mgmt_cmd_arr +
(sizetype)(i * 24)’ must not be NULL [-Werror=address]
 7503 |     for (; test->setup_mgmt_cmd_arr + i; ++i) {
   |        ^~~~
2022-06-02 12:00:28 -07:00
Luiz Augusto von Dentz
67b325c614 test-runner: Enable BT_HCIUART and BT_HCIUART_H4
These options are required when running with -u option since that uses
H4 headers to serialize the communication of host and guest.
2022-06-02 12:00:28 -07:00
Luiz Augusto von Dentz
7bcd32e67e test-runner: Fix not waiting for system_bus_socket
This makes test-runner wait for system_bus_socket to be available before
continuing otherwise the likes of bluetoothd would likely fail to start.
2022-06-02 12:00:28 -07:00
Joseph Hwang
93850c827d doc: Introduce the quality report command and event
Add the MGMT quality report command and event in doc/mgmt-api.txt.
2022-06-02 17:53:20 +02:00
Gopal Tiwari
5cdaeaefc3 mesh-gatt: Fix use_after_free
Following scenario happens when prov is false and we have double free as
mentioned in the below

bluez-5.64/tools/mesh-gatt/prov-db.c:847: freed_arg: "g_free" frees
"in_str".

bluez-5.64/tools/mesh-gatt/prov-db.c:867: double_free: Calling "g_free"
frees pointer "in_str" which has already been freed.
2022-05-31 13:08:58 -07:00
Gopal Tiwari
56bda20ce9 meshctl: Fix possible use_after_free
Reported by coverity tool as follows :

bluez-5.64/tools/meshctl.c:1968: freed_arg: "g_free" frees "mesh_dir".

bluez-5.64/tools/meshctl.c:2018: double_free: Calling "g_free" frees
pointer "mesh_dir" which has already been freed.
2022-05-31 13:08:57 -07:00
Gopal Tiwari
06d3c7429a pbap: Fix memory leak
Reported by coverity tool as follows:

bluez-5.64/obexd/client/pbap.c:929: leaked_storage: Variable "apparam"
going out of scope leaks the storage it points to.
2022-05-31 13:08:57 -07:00
Gopal Tiwari
39b638526d obex-client: Fix leaked_handle
While performing static tool analysis using coverity found following
reports for resouse leak

bluez-5.64/tools/obex-client-tool.c:315: leaked_handle: Handle variable
"sk" going out of scope leaks the handle.
2022-05-31 12:53:02 -07:00
Gopal Tiwari
35cbfd9660 mesh/mesh-db: Fix resource leaks
While performing static tool analysis using coverity found following
reports for resouse leak

bluez-5.64/tools/mesh/mesh-db.c:2388: leaked_handle: Handle variable
"fd" going out of scope leaks the handle.

bluez-5.64/tools/mesh/mesh-db.c:2388: leaked_storage: Variable "str"
going out of scope leaks the storage it points to.
2022-05-31 12:52:28 -07:00
Gopal Tiwari
4334be027a l2cap-tester: Fix leaked_handle
While performing static tool analysis using coverity found following
reports for resouse leak

bluez-5.64/tools/l2cap-tester.c:1712: leaked_handle: Handle variable
"new_sk" going out of scope leaks the handle.
2022-05-31 12:52:08 -07:00