Commit 00a5e86e authored by antirez's avatar antirez
Browse files

redis-cli: use sdsfreesplitres() instead of hand-coding it.

parent f72a3406
...@@ -850,8 +850,7 @@ static void repl() { ...@@ -850,8 +850,7 @@ static void repl() {
} }
} }
/* Free the argument vector */ /* Free the argument vector */
while(argc--) sdsfree(argv[argc]); sdsfreesplitres(argv,argc);
zfree(argv);
} }
/* linenoise() returns malloc-ed lines like readline() */ /* linenoise() returns malloc-ed lines like readline() */
free(line); free(line);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment