Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>: On Thu, 16 May 2024 15:40:48 +0200 you wrote: > 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] > bluez-5.75/obexd/plugins/filesystem.c:411:3: alloc_arg: "g_file_get_contents" allocates memory that is stored into "buf". > bluez-5.75/obexd/plugins/filesystem.c:418:3: noescape: Resource "buf" is not freed or pointed-to in "g_string_new". > bluez-5.75/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: > > [...] Here is the summary with links: - [BlueZ] obexd: Fix memory leak https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=46c0e376fe13 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html