Fix redis-cli memory leak when sending set preference command.

This commit is contained in:
dejun.xdj 2018-05-21 12:19:37 +08:00 committed by antirez
parent c7197ff50f
commit ac2a824aa9

View File

@ -1439,6 +1439,8 @@ static void repl(void) {
exit(0); exit(0);
} else if (argv[0][0] == ':') { } else if (argv[0][0] == ':') {
cliSetPreferences(argv,argc,1); cliSetPreferences(argv,argc,1);
sdsfreesplitres(argv,argc);
linenoiseFree(line);
continue; continue;
} else if (strcasecmp(argv[0],"restart") == 0) { } else if (strcasecmp(argv[0],"restart") == 0) {
if (config.eval) { if (config.eval) {