After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722357 - gio: fix small memory leak on local xattr
gio: fix small memory leak on local xattr
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-01-16 17:08 UTC by Marc-Andre Lureau
Modified: 2015-01-14 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gio: fix small memory leak on local xattr (1.53 KB, patch)
2014-01-16 17:08 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2014-01-16 17:08:43 UTC
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)
Comment 1 Marc-Andre Lureau 2014-01-16 17:08:46 UTC
Created attachment 266488 [details] [review]
gio: fix small memory leak on local xattr
Comment 2 Matthias Clasen 2014-01-17 01:27:37 UTC
Attachment 266488 [details] pushed as d3c729b - gio: fix small memory leak on local xattr
Comment 3 Vishal 2015-01-14 08:49:55 UTC
(In reply to comment #1)
> Created an attachment (id=266488) [details] [review]
> gio: fix small memory leak on local xattr

I need to test this patch ? Please attach a test case for the same or tell me how can i test this patch.