DCERPC: fix memleak by removing dummy element from ndr_pointer_list
authorPeter Wu <peter@lekensteyn.nl>
Wed, 10 Oct 2018 13:41:42 +0000 (15:41 +0200)
committerAnders Broman <a.broman58@gmail.com>
Fri, 12 Oct 2018 05:07:58 +0000 (05:07 +0000)
commitf57cf9e56c90c0c0c724f415eff35821afaaf849
tree860684b763931dab473b9b7c36c91fc3ba67ccc3
parent0e0e56d05bfc34026a9923f847b8c8d53136256f
DCERPC: fix memleak by removing dummy element from ndr_pointer_list

Instead of creating the pointers list early, defer it to the point when
a new list item is added. This avoids the need for a dummy element.

This happens to fix the memory leak in bug 14735 as well (verified with
both ASAN and valgrind).

Change-Id: I3b169dfc447bd7465d06c26e0bd9dfd4225b1307
Bug: 14735
Reviewed-on: https://code.wireshark.org/review/30115
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-dcerpc.c