diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2008-08-09 20:19:52 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2008-08-09 20:19:52 +0000 |
commit | 90b230cd1cf952c724fb899926baf01095d3e4b8 (patch) | |
tree | 248b52503a4a35864f9d08c43d4b4951115dc3f5 /epan/dissectors/packet-teamspeak2.c | |
parent | 165be685625b32790f6aa9ad96c0e0defb60f6e1 (diff) | |
download | wireshark-90b230cd1cf952c724fb899926baf01095d3e4b8.tar.gz wireshark-90b230cd1cf952c724fb899926baf01095d3e4b8.tar.bz2 wireshark-90b230cd1cf952c724fb899926baf01095d3e4b8.zip |
Fix an se_leak
svn path=/trunk/; revision=25974
Diffstat (limited to 'epan/dissectors/packet-teamspeak2.c')
-rw-r--r-- | epan/dissectors/packet-teamspeak2.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-teamspeak2.c b/epan/dissectors/packet-teamspeak2.c index 56bf3a833e..515939d063 100644 --- a/epan/dissectors/packet-teamspeak2.c +++ b/epan/dissectors/packet-teamspeak2.c @@ -705,9 +705,14 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree * guint16 type = tvb_get_letohs(tvb, 2); /*guint16 class = tvb_get_letohs(tvb, 0);*/ proto_tree_add_item(ts2_tree, hf_ts2_seqnum, tvb, 12, 4, TRUE); - frag = se_alloc(sizeof(ts2_frag)); - frag->frag_num=0; - + + + /* Get our stored fragmentation data or create one! */ + if ( ! ( frag = p_get_proto_data(pinfo->fd, proto_ts2) ) ) { + frag = se_alloc(sizeof(ts2_frag)); + frag->frag_num=0; + } + /* decide if the packet is server to client or client to server * then check its fragmentation */ |