From f6b7df3aec1d8fddf3121c4315fea4bf45cc4cfe Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 5 May 2016 13:57:57 +0200 Subject: [PATCH] redis-cli: don't free historyfile, is used later. --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 349c75c3..0cc6fd0d 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1222,7 +1222,6 @@ static void repl(void) { if (historyfile != NULL) { history = 1; linenoiseHistoryLoad(historyfile); - sdsfree(historyfile); } cliLoadPreferences(); } @@ -1232,6 +1231,7 @@ static void repl(void) { if (line[0] != '\0') { argv = cliSplitArgs(line,&argc); if (history) linenoiseHistoryAdd(line); + printf("HISTORY: %s\n", historyfile); if (historyfile) linenoiseHistorySave(historyfile); if (argv == NULL) {