Merge pull request #6825 from trevor211/fixMemoryLeakAboutLuaScript

Fix memory leak about lua script
This commit is contained in:
Salvatore Sanfilippo 2020-02-04 10:19:16 +01:00 committed by GitHub
commit 6ca1ad1e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2473,6 +2473,7 @@ void ldbEval(lua_State *lua, sds *argv, int argc) {
ldbLog(sdscatfmt(sdsempty(),"<error> %s",lua_tostring(lua,-1))); ldbLog(sdscatfmt(sdsempty(),"<error> %s",lua_tostring(lua,-1)));
lua_pop(lua,1); lua_pop(lua,1);
sdsfree(code); sdsfree(code);
sdsfree(expr);
return; return;
} }
} }

View File

@ -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
}