GNOME Bugzilla – Bug 69153
PATCH: g_convert_with_fallback converter leak
Last modified: 2011-02-18 15:47:19 UTC
when in the fallback case, after opening a converter for UTF-8 -> to_codeset, if the next g_convert() call fails (thus setting utf8 to NULL), the converter is never closed before aborting and returning NULL to the caller. Attached is a patch
Created attachment 6450 [details] [review] descriptor-leak.patch
Looks good to commit , but in reviewing the patch, I noticed two other bugs: - bytes_written is not set to zero if it exits in the place where you added the iconv_cloes() - bytes_written is given an invalid value in the normal return case; should be 'outp - dest', not 'outp - str' If you could fix those while you are at it, it would be great :-)
no prob. committed to cvs with your fixes as well.