aboutsummaryrefslogtreecommitdiff
path: root/lua/visrc.lua
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-01 22:31:23 +0200
committerMarc André Tanner <mat@brain-dump.org>2020-02-10 10:06:46 +0100
commit6af46f9aa5a2966e5aa93d69d53893b8976918ca (patch)
tree7021ec0e181d4f95da7340fe39ecbc71faa19c15 /lua/visrc.lua
parentc63161e34580080df3f44076449cacd43ab517bc (diff)
downloadvis-6af46f9aa5a2966e5aa93d69d53893b8976918ca.tar.gz
vis-6af46f9aa5a2966e5aa93d69d53893b8976918ca.tar.xz
vis-lua: avoid string memory leaks in error case
The function lua_pushstring can throw an error, meaning it will setjmp(3) out thereby leaking the allocated memory. By using lua_newuserdata we let Lua free the memory during a GC run.
Diffstat (limited to 'lua/visrc.lua')
0 files changed, 0 insertions, 0 deletions