diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-02 08:47:43 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-02 08:47:43 +0000 |
commit | 78042d4e77dbb67978d982c9a86b817854bf22ca (patch) | |
tree | 6de0831cdb49143ffd6ef220fab77d4a2dd25963 /epan/dissectors/packet-udp.c | |
parent | 19883c003aea03e915b61ed9b1f08763dd49e503 (diff) |
replace a rotating buffer for the udp header structure with ep allocated memory
svn path=/trunk/; revision=20682
Diffstat (limited to 'epan/dissectors/packet-udp.c')
-rw-r--r-- | epan/dissectors/packet-udp.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 81fed8a3d0..24376b78c0 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -177,16 +177,11 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) guint32 phdr[2]; guint16 computed_cksum; int offset = 0; - static e_udphdr udphstruct[4], *udph; - static int udph_count=0; + e_udphdr *udph; proto_tree *checksum_tree; proto_item *item; - udph_count++; - if(udph_count>=4){ - udph_count=0; - } - udph=&udphstruct[udph_count]; + udph=ep_alloc(sizeof(e_udphdr)); SET_ADDRESS(&udph->ip_src, pinfo->src.type, pinfo->src.len, pinfo->src.data); SET_ADDRESS(&udph->ip_dst, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data); |