From 6951c1ef247cfa9fcc3bd63f20f9a71d003d37ed Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sat, 22 Oct 2005 14:39:55 +0000 Subject: [PATCH] 2005-10-22 [colin] 1.9.15cvs93 * src/codeconv.c Fix leak --- ChangeLog-gtk2.claws | 5 +++++ PATCHSETS | 1 + configure.ac | 2 +- src/codeconv.c | 6 +++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 9a9f53ba4..7f53487da 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,8 @@ +2005-10-22 [colin] 1.9.15cvs93 + + * src/codeconv.c + Fix leak + 2005-10-22 [colin] 1.9.15cvs92 * src/codeconv.c diff --git a/PATCHSETS b/PATCHSETS index f8c3ea727..c2a8fecf1 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -929,3 +929,4 @@ ( cvs diff -u -r 1.382.2.186 -r 1.382.2.187 src/compose.c; ) > 1.9.15cvs90.patchset ( cvs diff -u -r 1.2.16.1 -r 1.2.16.2 src/pixmaps/new.xpm; cvs diff -u -r 1.2.16.2 -r 1.2.16.3 src/pixmaps/unread.xpm; ) > 1.9.15cvs91.patchset ( cvs diff -u -r 1.65.2.41 -r 1.65.2.42 src/codeconv.c; ) > 1.9.15cvs92.patchset +( cvs diff -u -r 1.65.2.42 -r 1.65.2.43 src/codeconv.c; ) > 1.9.15cvs93.patchset diff --git a/configure.ac b/configure.ac index 0d77ed211..5c53c2e18 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=15 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=92 +EXTRA_VERSION=93 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/codeconv.c b/src/codeconv.c index e3a9a834a..b9920685e 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -696,8 +696,12 @@ void conv_localetodisp(gchar *outbuf, gint outlen, const gchar *inbuf) if (tmpstr && g_utf8_validate(tmpstr, -1, NULL)) { strncpy2(outbuf, tmpstr, outlen); g_free(tmpstr); - } else + return; + } else { + if (tmpstr) + g_free(tmpstr); conv_utf8todisp(outbuf, outlen, inbuf); + } } static void conv_noconv(gchar *outbuf, gint outlen, const gchar *inbuf) -- 2.25.1