Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6ca1ad1e
Unverified
Commit
6ca1ad1e
authored
Feb 04, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Feb 04, 2020
Browse files
Merge pull request #6825 from trevor211/fixMemoryLeakAboutLuaScript
Fix memory leak about lua script
parents
2400f578
eb2196f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
6ca1ad1e
...
...
@@ -2473,6 +2473,7 @@ void ldbEval(lua_State *lua, sds *argv, int argc) {
ldbLog
(
sdscatfmt
(
sdsempty
(),
"<error> %s"
,
lua_tostring
(
lua
,
-
1
)));
lua_pop
(
lua
,
1
);
sdsfree
(
code
);
sdsfree
(
expr
);
return
;
}
}
...
...
tests/unit/scripting.tcl
View file @
6ca1ad1e
...
...
@@ -741,3 +741,8 @@ start_server {tags {"scripting repl"}} {
}
}
start_server
{
tags
{
"scripting"
}}
{
r script debug sync
r eval
{
return 'hello'
}
0
r eval
{
return 'hello'
}
0
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment