diff options
author | Jörg Mayer <jmayer@loplof.de> | 2013-09-13 10:13:19 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2013-09-13 10:13:19 +0000 |
commit | 23d3e3d665ce2826477bf04ceabe961330cfcd5a (patch) | |
tree | 5ba7e0d34e5a234c811a34fdd9e4ba2b52dd1848 /epan/dissectors/packet-cdp.c | |
parent | 1e762e315dcb07f8d78d7aabc20f5065a8ed43f0 (diff) |
Dario Lombardo <lomato@gmail.com> via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9147
Migration from emem to wmem for trivial cases (ep_alloc only).
svn path=/trunk/; revision=52002
Diffstat (limited to 'epan/dissectors/packet-cdp.c')
-rw-r--r-- | epan/dissectors/packet-cdp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index 23fc1ade61..c6329932f1 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -31,6 +31,7 @@ #include <epan/packet.h> #include <epan/strutil.h> #include <epan/in_cksum.h> +#include <epan/wmem/wmem.h> #include <epan/oui.h> #include <epan/nlpid.h> @@ -245,7 +246,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (data_length & 1) { guint8 *padded_buffer; /* Allocate new buffer */ - padded_buffer = (guint8 *)ep_alloc(data_length+1); + padded_buffer = (guint8 *)wmem_alloc(wmem_packet_scope(), data_length+1); tvb_memcpy(tvb, padded_buffer, 0, data_length); /* Swap bytes in last word */ padded_buffer[data_length] = padded_buffer[data_length-1]; |