From 4d2e653901ab7bb17c9ed3269a930569d8ada5eb Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Fri, 9 Oct 2009 07:24:33 +0000 Subject: From Didier Gautheron: Dissectors using call_dissector() function inside a 'if (tree) {}' block. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4107 svn path=/trunk/; revision=30415 --- epan/dissectors/packet-turbocell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-turbocell.c') diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c index f18fa1f9ab..7c5f3f955e 100644 --- a/epan/dissectors/packet-turbocell.c +++ b/epan/dissectors/packet-turbocell.c @@ -122,12 +122,13 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre { proto_item *ti, *name_item; - proto_tree *turbocell_tree, *network_tree; + proto_tree *turbocell_tree = NULL, *network_tree; tvbuff_t *next_tvb; int i=0; guint8 packet_type; guint8 * str_name; guint str_len; + gint remaining_length; packet_type = tvb_get_guint8(tvb, 0); @@ -146,7 +147,6 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } if (tree) { - gint remaining_length; ti = proto_tree_add_item(tree, proto_turbocell, tvb, 0, 20, FALSE); turbocell_tree = proto_item_add_subtree(ti, ett_turbocell); @@ -171,6 +171,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_tree_add_item(turbocell_tree, hf_turbocell_unknown, tvb, 0x0E, 2, FALSE); proto_tree_add_item(turbocell_tree, hf_turbocell_ip, tvb, 0x10, 4, FALSE); + } remaining_length=tvb_length_remaining(tvb, 0x14); @@ -245,7 +246,6 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } } } - } } /* Register the protocol with Wireshark */ -- cgit v1.2.3