steam-ihs: fix memleak on exception
authorPeter Wu <peter@lekensteyn.nl>
Tue, 9 Oct 2018 16:16:11 +0000 (18:16 +0200)
committerAnders Broman <a.broman58@gmail.com>
Wed, 10 Oct 2018 04:01:29 +0000 (04:01 +0000)
commitf3986c24728f03a346a10388fd6c15ea9ae16d41
tree2b5439a673402f6be050b534c86500c592048eb0
parent0d812e0a0c9dfa2163db6027cb4ed0a35e46d662
steam-ihs: fix memleak on exception

When protobuf_dissect_unknown_field throws an exception,
steamdiscover_dissect_body_status will leak memory as
wmem_destroy_allocator is not called. Capture fuzz-2018-10-06-3104.pcap
from the linked bug leaks 64kiB memory in each frame 14 and 36.

Bug: 15171
Change-Id: I930d0738fde61799ab4ef2310f8ff11c1bcb032b
Fixes: v2.5.1rc0-130-g7ae954c7ac ("steam-ihs: Add dissector for the Steam IHS Discovery Protocol")
Reviewed-on: https://code.wireshark.org/review/30098
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-steam-ihs-discovery.c