From acb7c826b3df50bd9825baf3b2ffaaa79c8b80df Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 16 Jul 2016 16:51:56 +0200 Subject: api: fix leak when a api function is incorrectly called with a list. This applies both to msgpack-rpc and eval. --- scripts/gendispatch.lua | 6 ------ 1 file changed, 6 deletions(-) (limited to 'scripts') diff --git a/scripts/gendispatch.lua b/scripts/gendispatch.lua index 2846aece5d..12d6261b5a 100644 --- a/scripts/gendispatch.lua +++ b/scripts/gendispatch.lua @@ -293,14 +293,8 @@ for i = 1, #functions do if fn.return_type ~= 'void' then output:write('\n ret = '..string.upper(real_type(fn.return_type))..'_OBJ(rv);') end - -- Now generate the cleanup label for freeing memory allocated for the - -- arguments output:write('\n\ncleanup:'); - for j = 1, #fn.parameters do - local param = fn.parameters[j] - output:write('\n api_free_'..string.lower(real_type(param[1]))..'(arg_'..j..');') - end output:write('\n return ret;\n}\n\n'); end end -- cgit