URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0c71b13b3e444f7d6d891aa3c9a2bc22601392f5
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
0c71b13 by Peter Wu (peter@xxxxxxxxxxxxx):
prefs: fix memleak
Calling g_list_remove_link(link, llink) does not free the removed
last link llink. g_list_next or g_list_foreach+g_free followed by
g_list_free should be used instead such that the data is freed before
and then dropped from the list.
This fixes a memleak in tshark -r dns.pcap detected by ASAN (single
packet).
Set pref->default_val.list = NULL just in case, and with symmetry with
capture_columns handling.
Change-Id: I3cc52e275784037ab40c0b42c68d0dd83b73cd98
Reviewed-on: https://code.wireshark.org/review/9026
Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from 42c324d packet: fix memleak
adds 0c71b13 prefs: fix memleak
Summary of changes:
epan/prefs.c | 52 ++++++++++++----------------------------------------
1 file changed, 12 insertions(+), 40 deletions(-)