Fix memory leaks in obex
authorSteve Grubb <sgrubb@redhat.com>
Sat, 15 May 2021 13:43:07 +0000 (09:43 -0400)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commita468164388a6c9aa325f4aa07a6032f8cb71f77a
treec1fee75a6dd564eb0d8672f026d5041eabfb9c66
parent20d15ee7e5b8f3e4d5299595a1bcaf55595feab4
Fix memory leaks in obex

This patch fixes a couple memory leaks.

In filesystem, g_file_get_contents allocates fresh memory to buf.
It needs to be freed after conversion to a GString object.

Destination was missed on an error path as is mld.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
obexd/plugins/ftp.c
obexd/plugins/messages-dummy.c