From 112ce5299e6534ef0dac6ac8280b0fd7c512eeeb Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Sat, 24 Mar 2018 14:54:27 -0400 Subject: [PATCH] GUACAMOLE-269: Remove unnecessary dynamic allocation. --- src/terminal/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index c19bd835..bfc36d1a 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1600,7 +1600,7 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed /* Backspace can vary based on configuration of terminal by client. */ if (keysym == 0xFF08) { - char* backspace_str = malloc(sizeof(char) * 2); + char backspace_str[2]; backspace_str[0] = term->backspace; backspace_str[1] = '\0'; return guac_terminal_send_string(term, backspace_str);