mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 11:43:34 +08:00
(idna_to_unicode_4z4z): Fix test for failed memory allocation.
This commit is contained in:
parent
48db0d69c8
commit
f6d77b2076
@ -115,9 +115,11 @@ idna_to_ascii_4i (const uint32_t * in, size_t inlen, char *out, int flags)
|
|||||||
len = strlen (p);
|
len = strlen (p);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
char *newp;
|
||||||
|
|
||||||
len = 2 * len + 10; /* XXX better guess? */
|
len = 2 * len + 10; /* XXX better guess? */
|
||||||
char *newp = realloc (p, len);
|
newp = realloc (p, len);
|
||||||
if (p == NULL)
|
if (newp == NULL)
|
||||||
{
|
{
|
||||||
free (p);
|
free (p);
|
||||||
return IDNA_MALLOC_ERROR;
|
return IDNA_MALLOC_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user