mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02:00
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)
This commit is contained in:
parent
3fb0fb2ef4
commit
dedf19723f
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2006-10-16 Behdad Esfahbod <behdad@gnome.org>
|
||||||
|
|
||||||
* glib/gnulib/Makefile.am: Add $(GLIB_DEBUG_FLAGS). (#362543,
|
* glib/gnulib/Makefile.am: Add $(GLIB_DEBUG_FLAGS). (#362543,
|
||||||
|
@ -183,8 +183,12 @@ _g_locale_get_charset_aliases (void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
char * p = res_ptr;
|
||||||
res_size += l1 + 1 + l2 + 1;
|
res_size += l1 + 1 + l2 + 1;
|
||||||
res_ptr = (char *) realloc (res_ptr, res_size + 1);
|
res_ptr = (char *) realloc (res_ptr, res_size + 1);
|
||||||
|
if (res_ptr == NULL) {
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (res_ptr == NULL)
|
if (res_ptr == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user