]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
wireshark: s/ep_alloc/wmem_alloc/
authorMichal Privoznik <mprivozn@redhat.com>
Sun, 27 Dec 2015 09:49:10 +0000 (10:49 +0100)
committerCole Robinson <crobinso@redhat.com>
Wed, 20 Apr 2016 14:55:06 +0000 (10:55 -0400)
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)

tools/wireshark/src/packet-libvirt.c

index 3103562896baa12b21b60cc458b27cd64dc7c57f..f7c8e0c2888fbf2828302584fb62e28c3ca1ae9c 100644 (file)
@@ -113,7 +113,7 @@ format_xdr_bytes(guint8 *bytes, guint32 length)
 
     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. */