Fix #99593: Fix a memory leak when XmbLookupString returns XBufferOverflow

* modules/input/gtkimcontextxim.c
	(gtk_im_context_xim_filter_keypress):
	Fix #99593: Fix a memory leak when XmbLookupString returns
	XBufferOverflow
This commit is contained in:
Hidetoshi Tajima 2002-11-26 22:13:50 +00:00
parent b9c08f5e9a
commit 60207c3762
7 changed files with 47 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -1,3 +1,10 @@
Tue Nov 26 13:07:56 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c
(gtk_im_context_xim_filter_keypress):
Fix #99593: Fix a memory leak when XmbLookupString returns
XBufferOverflow
2002-11-26 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (elide_underscores): Fix nasty typo (#99653):

View File

@ -560,6 +560,8 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
if (status == XBufferOverflow)
{
buffer_size = num_bytes;
if (buffer != static_buffer)
g_free (buffer);
buffer = g_malloc (num_bytes + 1);
goto again;
}
@ -590,6 +592,9 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
}
}
if (buffer != static_buffer)
g_free (buffer);
return result;
}