diff options
Diffstat (limited to 'src/ui/statusbar.c')
-rw-r--r-- | src/ui/statusbar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index eb39467b..bbb3b781 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -277,8 +277,7 @@ _status_bar_print_message(const char * const msg) if (message != NULL) { free(message); } - message = (char *) malloc(strlen(msg) + 1); - strcpy(message, msg); + message = strdup(msg); mvwprintw(status_bar, 0, 10, message); int cols = getmaxx(stdscr); |