Wireshark-commits: [Wireshark-commits] master 0aa0fb2: Another round of extcap memleak fixes
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0aa0fb25e048c1d9abca03a8a1681b99ddcc7410
Submitter: Roland Knall (rknall@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
0aa0fb2 by Peter Wu (peter@xxxxxxxxxxxxx):
Another round of extcap memleak fixes
Fix a bunch of memory leaks, mainly because extcap_base_cleanup is not
called on most execution paths and because memory allocated for options
were not freed.
Additionally, randpkt will now fail if no option is given (it previously
returned 0 if --capture was missing). Logic using "goto" is introduced
with the idea that a program should fail (ret = EXIT_FAILURE) unless
proven otherwise.
Now none of the extcap programs are leaking:
for what in ssh cisco; do
for arg in '' --help --extcap-interfaces --extcap-interface=$what; do
extcap/${what}dump $arg; done; done
./tshark -D
Change-Id: I6df1027ed0c32bd53fe87e6c54d355bc8ddd01f5
Reviewed-on: https://code.wireshark.org/review/14671
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
Actions performed:
from 24768a7 Assorted cleanups.
adds 0aa0fb2 Another round of extcap memleak fixes
Summary of changes:
extcap/ciscodump.c | 43 +++++++++++++++++++++------------
extcap/extcap-base.c | 5 +++-
extcap/randpktdump.c | 49 +++++++++++++++++++++----------------
extcap/sshdump.c | 65 ++++++++++++++++++++++++++++----------------------
wsutil/interface.c | 1 +
5 files changed, 97 insertions(+), 66 deletions(-)