summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhwware <wen.hui.ware@gmail.com>2020-03-18 09:33:52 -0400
committerhwware <wen.hui.ware@gmail.com>2020-03-18 09:33:52 -0400
commit86691ccff51b0065d430836e15c81464cc691765 (patch)
treeb363e4cbc157ce66801dbccfd48119d462313b6c
parentb3a97004f4c5555158f774279e5e2131cf909a6d (diff)
downloadredis-86691ccff51b0065d430836e15c81464cc691765.tar.gz
fix potentical memory leak in redis-cli
-rw-r--r--src/redis-cli.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 7ad80c0a1..c0cc69592 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1989,6 +1989,8 @@ static void repl(void) {
if (config.eval) {
config.eval_ldb = 1;
config.output = OUTPUT_RAW;
+ sdsfreesplitres(argv,argc);
+ linenoiseFree(line);
return; /* Return to evalMode to restart the session. */
} else {
printf("Use 'restart' only in Lua debugging mode.");