summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-05-05 13:57:57 +0200
committerantirez <antirez@gmail.com>2016-05-05 13:57:57 +0200
commitf6b7df3aec1d8fddf3121c4315fea4bf45cc4cfe (patch)
treeedce137e145ac78abdbfce3db4188d48d9f4dc64
parent97ce72fa2d348f914fc40ccf0a32008c7362b817 (diff)
downloadredis-f6b7df3aec1d8fddf3121c4315fea4bf45cc4cfe.tar.gz
redis-cli: don't free historyfile, is used later.
-rw-r--r--src/redis-cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 349c75c38..0cc6fd0dc 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) {