diff options
Diffstat (limited to 'binutils/winduni.c')
-rw-r--r-- | binutils/winduni.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/winduni.c b/binutils/winduni.c index d459b2e..4a6231a 100644 --- a/binutils/winduni.c +++ b/binutils/winduni.c @@ -213,7 +213,7 @@ unicode_from_ascii_len (rc_uint_type *length, unichar **unicode, const char *asc } /* Make sure we have zero terminated string. */ - p = tmp = (char *) alloca (a_length + 1); + p = tmp = (char *) xmalloc (a_length + 1); memcpy (tmp, ascii, a_length); tmp[a_length] = 0; @@ -279,6 +279,8 @@ unicode_from_ascii_len (rc_uint_type *length, unichar **unicode, const char *asc if (length) *length = idx; + + free (tmp); } /* Convert an unicode string to an ASCII string. We just copy it, |