Fix memory leak in moduleFreeCommand (#11147)

Currently, we call zfree(cmd->args), but the argument array
needs to be freed recursively (there might be sub-args).
Also fixed memory leaks on cmd->tips and cmd->history.

Fixes #11145
This commit is contained in:
Binbin
2022-08-18 12:36:01 +03:00
committed by GitHub
parent 508a138885
commit fc3956e8f4
2 changed files with 22 additions and 1 deletions
@@ -40,4 +40,8 @@ start_server {tags {"modules"}} {
assert_equal $redis_reply $module_reply
}
test "Unload the module - cmdintrospection" {
assert_equal {OK} [r module unload cmdintrospection]
}
}