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 669898 - [PATCH] Fix a possible memory leak in gedit_document_output_stream_write()
[PATCH] Fix a possible memory leak in gedit_document_output_stream_write()
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-11 17:36 UTC by Daniel Trebbien
Modified: 2012-02-11 17:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.07 KB, patch)
2012-02-11 17:37 UTC, Daniel Trebbien
none Details | Review

Description Daniel Trebbien 2012-02-11 17:36:25 UTC
If gedit_document_output_stream_write() is called and the ostream is not initialized, g_iconv_open() fails (so gedit_document_output_stream_write() returns -1), and gedit_document_output_stream_write() is called again, then the `charset_conv` that was created during the previous initialization attempt would be leaked.
Comment 1 Daniel Trebbien 2012-02-11 17:37:33 UTC
Created attachment 207352 [details] [review]
Fix
Comment 2 Paolo Borelli 2012-02-11 17:49:34 UTC
You are a walking valgrind :P

Committed, thanks!