diff options
author | Alan Modra <amodra@gmail.com> | 2025-01-17 14:23:43 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-01-17 14:28:22 +1030 |
commit | 8bd9df098fe6c697a29f679613e95afb9c90e013 (patch) | |
tree | 13a82d6375efffa0fe02b0665b87b54754a7a47b | |
parent | 18575d2ca8b836156a437908155ea4bf7da3ff10 (diff) | |
download | gdb-8bd9df098fe6c697a29f679613e95afb9c90e013.zip gdb-8bd9df098fe6c697a29f679613e95afb9c90e013.tar.gz gdb-8bd9df098fe6c697a29f679613e95afb9c90e013.tar.bz2 |
Re: ld parser buffer leak
Apparently reflex doesn't have yyalloc.
* ldlex.l (yy_create_string_buffer): Revert last change.
-rw-r--r-- | ld/ldlex.l | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -529,13 +529,13 @@ yy_create_string_buffer (const char *string, size_t size) { YY_BUFFER_STATE b; - b = yyalloc (sizeof (struct yy_buffer_state)); + b = xmalloc (sizeof (struct yy_buffer_state)); b->yy_input_file = 0; b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = yyalloc (b->yy_buf_size + 3); + b->yy_ch_buf = xmalloc (b->yy_buf_size + 3); b->yy_ch_buf[0] = '\n'; strcpy (b->yy_ch_buf+1, string); |