Wireshark-commits: [Wireshark-commits] master 141f6d8: wslua_field: fix memory leaks in Field_new
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=141f6d8df954c990be98d70d8074498688f4a2d3
Submitter: "Stig Bjørlykke <stig@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
141f6d8 by Peter Wu (peter@xxxxxxxxxxxxx):
wslua_field: fix memory leaks in Field_new
Change the "Field" type to actually point to a structure. Do not cheat
and overload the pointer to mean "char*" in one context, and
"header_field_info*" in another. It was very confusing.
Implement Field__gc to free the Field structure that was allocated in
Field_new. This fixes the memory leak in Field_new.
Now the test_wslua_field test passes when executed with ASAN and a bunch
of other wslua tests also improve.
Change-Id: Ibc4318b76bb893151fd40c3fbc595402fba7a60a
Reviewed-on: https://code.wireshark.org/review/31743
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Actions performed:
from 14d5ab0 SMB2: ensure that preauth_hash_current pointer is always initialized
add 141f6d8 wslua_field: fix memory leaks in Field_new
Summary of changes:
epan/wslua/wslua.h | 8 ++++-
epan/wslua/wslua_field.c | 79 ++++++++++++++++++++++++------------------------
2 files changed, 47 insertions(+), 40 deletions(-)