In wireshark, they have introduced their own memory allocator
wmem. This means that we need to adapt our code to that change
too. Notably
0ad15f88ccf434e8210ca is the wireshark commit you
want to look at. It's the one where they dropped the old API. The
new allocator has been introduced in
84cc3daa (v1.10.0), however,
was not exposed until
5c05c9e0 (v1.10.0). Since we already are
requiring 1.11.3 or higher no other change is needed.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit
0bfdb9cb2404c23b74edce94de998a24db86d748)
if (length == 0)
return "";
- buf = ep_alloc(length*2 + 1);
+ buf = wmem_alloc(wmem_packet_scope(), length*2 + 1);
for (i = 0; i < length; i++) {
/* We know that buf has enough size to contain
2 * length + '\0' characters. */