提交 02db338a 编写于 作者: A antirez

redis-cli: don't free historyfile, is used later.

上级 4c53bab1
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册