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 777075 - Potential leak of memory pointed to by 'list'
Potential leak of memory pointed to by 'list'
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-01-10 08:31 UTC by Leslie Zhai
Modified: 2017-11-17 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glocalfileinfo: Fix a leak on an error handling path (868 bytes, patch)
2017-11-17 14:43 UTC, Philip Withnall
committed Details | Review

Description Leslie Zhai 2017-01-10 08:31:48 UTC
Hi GLib developers,

Bug reported by the clang static analyzer https://pbs.twimg.com/media/C1y7wlKUUAIDck-.jpg

Description: Potential leak of memory pointed to by 'list'
File: /data/project/gnome/glib/gio/glocalfileinfo.c
Line: 639
Comment 1 Philip Withnall 2017-11-17 14:43:48 UTC
Created attachment 363931 [details] [review]
glocalfileinfo: Fix a leak on an error handling path

Spotted by Clang static analysis, thanks to Leslie Zhai.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Colin Walters 2017-11-17 14:58:27 UTC
Review of attachment 363931 [details] [review]:

Ugh man reading this code...the indentation looks busted here, mix of tabs and spaces.  Anyways this looks right to me.
Comment 3 Philip Withnall 2017-11-17 15:10:58 UTC
Attachment 363931 [details] pushed as 9ab0073 - glocalfileinfo: Fix a leak on an error handling path