From 2d4c4fca2583bbc54bc3f76daca1b93d922391c7 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 6 Feb 2015 02:33:02 +0000 Subject: Fixed _s_tempnam(). git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3463 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 5 +++++ libsylph/utils.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85b6cf44..c8df05f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-02-06 + + * libsylph/utils.c: _s_tempnam(): memory allocated by _wtempnam() + must be freed by MSVCRT, not by GLib (thanks to Gisle Vanem). + 2015-01-16 * src/gtkutils.c: gtkut_text_buffer_insert_with_tag_by_name(): diff --git a/libsylph/utils.c b/libsylph/utils.c index 3c54611c..0faf6b48 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -3745,7 +3745,8 @@ gchar *_s_tempnam(const gchar *dir, const gchar *prefix) save_errno = EINVAL; } - g_free(wname); + free(wname); /* must be freed by same MSVCRT used for + _wtempnam() */ g_free(wprefix); g_free(wpath); @@ -3779,7 +3780,7 @@ gchar *_s_tempnam(const gchar *dir, const gchar *prefix) save_errno = EINVAL; } - g_free(cp_name); + free(cp_name); g_free(cp_prefix); g_free(cp_path); -- cgit v1.2.3