Commit dedf1972 authored by Pascal Terjan's avatar Pascal Terjan Committed by Pascal Terjan

Fix small leak on failed realloc in _g_locale_get_charset_aliases

2006-10-26  Pascal Terjan  <pterjan@linuxfr.org>

	* glib/libcharset/localcharset.c: Fix small leak on failed
	realloc in _g_locale_get_charset_aliases (#338582)
parent 3fb0fb2e
2006-10-26 Pascal Terjan <pterjan@linuxfr.org>
* glib/libcharset/localcharset.c: Fix small leak on failed
realloc in _g_locale_get_charset_aliases (#338582)
2006-10-16 Behdad Esfahbod <behdad@gnome.org>
* glib/gnulib/Makefile.am: Add $(GLIB_DEBUG_FLAGS). (#362543,
......
......@@ -183,8 +183,12 @@ _g_locale_get_charset_aliases (void)
}
else
{
char * p = res_ptr;
res_size += l1 + 1 + l2 + 1;
res_ptr = (char *) realloc (res_ptr, res_size + 1);
if (res_ptr == NULL) {
free(p);
}
}
if (res_ptr == NULL)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment