diff options
author | ZyX <kp-pav@yandex.ru> | 2017-01-21 01:42:50 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-27 00:12:22 +0300 |
commit | 53b89c1dcf44c95827cc85a9657faee451c573c5 (patch) | |
tree | 6f3ee3e59a3abb5fdae5a6fc808ca446247f4c60 /src | |
parent | bca9c2f3c4af9c132439bbfeaed028ac3171db48 (diff) | |
download | rneovim-53b89c1dcf44c95827cc85a9657faee451c573c5.tar.gz rneovim-53b89c1dcf44c95827cc85a9657faee451c573c5.tar.bz2 rneovim-53b89c1dcf44c95827cc85a9657faee451c573c5.zip |
executor/executor: Free lcmd on error
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/viml/executor/executor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/viml/executor/executor.c b/src/nvim/viml/executor/executor.c index 29ec8dc927..acc375881c 100644 --- a/src/nvim/viml/executor/executor.c +++ b/src/nvim/viml/executor/executor.c @@ -221,6 +221,9 @@ static int nlua_eval_lua_string(lua_State *lstate) if (luaL_loadbuffer(lstate, lcmd, lcmd_len, NLUA_EVAL_NAME)) { nlua_error(lstate, _("E5107: Error while creating lua chunk for luaeval(): %.*s")); + if (lcmd != (char *)IObuff) { + xfree(lcmd); + } return 0; } if (lcmd != (char *)IObuff) { |