gio: fix small memory leak on local xattr
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Thu, 16 Jan 2014 17:02:18 +0000 (18:02 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jan 2014 01:27:26 +0000 (20:27 -0500)
commitd3c729bf0e3320046f309ce64b4ff0189563fe89
treec571f5efc1d091789f50dbafed5cfb79695ac5cb
parentfabdf80c7de57e531fba70052a89ed19d3c24e91
gio: fix small memory leak on local xattr

g_strconcat() allocates memory, it needs to be freed.

==10653== 1,400 bytes in 50 blocks are definitely lost in loss record
1,838 of 1,851
==10653==    at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==10653==    by 0x54ACB22: g_malloc (gmem.c:102)
==10653==    by 0x54ACE4D: g_malloc_n (gmem.c:343)
==10653==    by 0x54C8463: g_strconcat (gstrfuncs.c:589)
==10653==    by 0x4D6ED38: get_xattrs_from_fd (glocalfileinfo.c:660)
==10653==    by 0x4D71622:
_g_local_file_info_get_from_fd (glocalfileinfo.c:2028)
==10653==    by 0x4D731A0:
g_local_file_input_stream_query_info (glocalfileinputstream.c:356)
==10653==    by 0x4C996D8:
g_file_input_stream_query_info (gfileinputstream.c:148)
==10653==    by 0x4C863F6: file_copy_fallback (gfile.c:3120)
==10653==    by 0x4C86DD2: g_file_copy (gfile.c:3398)

https://bugzilla.gnome.org/show_bug.cgi?id=722357
gio/glocalfileinfo.c