mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
The main difference is that wmem_packet_scope() is gone [1] but the packet_info struct has 'pool` member which points to the allocator used for given packet. Unfortunately, while we were given pointer to packet_info at the entry level to our dissector (dissect_libvirt() -> tcp_dissect_pdus() -> dissect_libvirt_message()) it was never propagated to generated/primitive dissectors. But not all dissectors need to allocate memory, so mark the new argument as unused. And while our generator could be rewritten so that the argument is annotated as unused iff it's really unused, I couldn't bother rewriting it. It's generated code after all. Too much work for little gain. Another significant change is that val_to_str() now requires new argument: pointer to allocator to use because it always allocates new memory [2][3]. 1: https://gitlab.com/wireshark/wireshark/-/commit/5ca5c9ca372e06881b23ba9f4fdcb6b479886444 2: https://gitlab.com/wireshark/wireshark/-/commit/b63599762468e4cf1783419a5556377604d344bb 3: https://gitlab.com/wireshark/wireshark/-/commit/84799be215313e61b83a3eaf074f89d6ee349b8c Resolves: https://gitlab.com/libvirt/libvirt/-/issues/823 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>