Wireshark-bugs: [Wireshark-bugs] [Bug 5575] Patch to fix memory leaks/errors in Lua plugin

Date: Fri, 21 Feb 2014 07:07:11 +0000

Comment # 28 on bug 5575 from
For patch 2/6 "Improve userdata type checking": 

The existing checkFoo()already calls luaL_checkudata() which does the same
checking as this patch.

For the other xxxFoo() functions, yeah this patch moves their code to
a common testFoo() function, which basically does something similar to
checkFoo() but without throwing the error - but if we want that, we
should just use luaL_testudata(), which is exactly luaL_checkudata()
without throwing an error (luaL_checkudata is just a wrapper that
calls luaL_testudata under the hood, and throws an error if it fails).

The other change in this patch, adding a WSLUA_NEW_METATABLE to do similar
things for both classes and metatable registration, with debug info... has
actually been added over time (but not exactly this way).


You are receiving this mail because:
  • You are the assignee for the bug.
  • You are watching all bug changes.