URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eec3ce3bb211be10f1804423818f2689b0fa517e
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
eec3ce3 by Peter Wu (peter@xxxxxxxxxxxxx):
dfilter: fix memory leaks on dfilter compile errors involving a set
If a display filter contains a set for the set membership operator and
an error occurs, then gen_relation_in() (called via dfw_gencode() will
not take ownership of the set and a memory leak occurs.
Fix this by implementing a free callback for STTYPE_SET nodes which
frees unclaimed data. Add tests to verify the effectiveness, ASAN no
longer complains after this fix.
Bug: 15442
Change-Id: If37cf047660464b2d0304748034d0bc22111e5d6
Reviewed-on: https://code.wireshark.org/review/31758
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from e8e60df dfilter: fix memory leaks if a dfilter fails to compile
add eec3ce3 dfilter: fix memory leaks on dfilter compile errors involving a set
Summary of changes:
epan/dfilter/gencode.c | 7 +++----
epan/dfilter/sttype-set.c | 11 ++++++++++-
test/suite_dfilter/group_membership.py | 10 ++++++++++
3 files changed, 23 insertions(+), 5 deletions(-)