Signed-off-by: Michael Witten <mfwit...@gmail.com> --- parse.y | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/parse.y b/parse.y index a12c4d0..b61c4d0 100644 --- a/parse.y +++ b/parse.y @@ -4538,17 +4538,13 @@ read_token_word (character) shell's single-character parameter expansions, and set flags.*/ else if MBTEST(character == '$' && peek_char == '$') { - ttok = (char *)xmalloc (3); - ttok[0] = ttok[1] = '$'; - ttok[2] = '\0'; RESIZE_MALLOCED_BUFFER (token, token_index, 2, token_buffer_size, TOKEN_DEFAULT_GROW_SIZE); - strcpy (token + token_index, ttok); - token_index += 2; + token[token_index++] = '$'; + token[token_index++] = '$'; dollar_present = 1; all_digit_token = 0; - FREE (ttok); goto next_character; } else -- 1.7.4.22.g14b16.dirty