aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/lua/packet-lua.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-02-15 02:10:07 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-02-15 02:10:07 +0000
commit0646b117585153b71dec4fd3b7bc30c4f157e6f1 (patch)
treee243c6511f4d39c2727ae7bac64aa34c6dd728dc /plugins/lua/packet-lua.c
parent2d7b55d80861a0af2b9a21cb4d039045c02d0a1a (diff)
Protect The tree and The tvb from being used outside their scope
svn path=/trunk/; revision=17307
Diffstat (limited to 'plugins/lua/packet-lua.c')
-rw-r--r--plugins/lua/packet-lua.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/lua/packet-lua.c b/plugins/lua/packet-lua.c
index 3332be53e3..53bc30876e 100644
--- a/plugins/lua/packet-lua.c
+++ b/plugins/lua/packet-lua.c
@@ -154,9 +154,9 @@ void dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
if (lua_isfunction(L,1)) {
- pushTvb(L,tvb);
+ push_Tvb(L,tvb);
push_Pinfo(L,pinfo);
- pushProtoTree(L,tree);
+ push_ProtoTree(L,tree);
if ( lua_pcall(L,3,0,0) ) {
const gchar* error = lua_tostring(L,-1);
@@ -173,6 +173,8 @@ void dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
clear_outstanding_tvbs();
clear_outstanding_pinfos();
+ clear_outstanding_trees();
+
lua_pinfo = NULL;
lua_tree = NULL;