Branch: refs/heads/master Home: https://github.com/bluez/bluez Commit: 46c0e376fe134aba1d0876a7a50e524dfdf7175d https://github.com/bluez/bluez/commit/46c0e376fe134aba1d0876a7a50e524dfdf7175d Author: Bastien Nocera <hadess@xxxxxxxxxx> Date: 2024-05-17 (Fri, 17 May 2024) Changed paths: M obexd/plugins/filesystem.c Log Message: ----------- obexd: Fix memory leak To not leak "buf", we need object->buffer to take ownership of it using g_string_new_take() (but it's only available in 2.78 and newer), or we need to actually free "buf". Error: RESOURCE_LEAK (CWE-772): [#def66] [important] obexd/plugins/filesystem.c:411:3: alloc_arg: "g_file_get_contents" allocates memory that is stored into "buf". obexd/plugins/filesystem.c:418:3: noescape: Resource "buf" is not freed or pointed-to in "g_string_new". obexd/plugins/filesystem.c:440:2: leaked_storage: Variable "buf" going out of scope leaks the storage it points to. 438| *err = 0; 439| 440|-> return object; 441| 442| fail: To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications