diff options
author | Dario Lombardo <lomato@gmail.com> | 2018-03-10 23:36:38 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-03-15 06:31:13 +0000 |
commit | b19ca06fcc12d3f9b28d14bf3718bf74dbbf5f58 (patch) | |
tree | 98ae7c5da23f72b89b809dadf56486178e945f50 /ui | |
parent | f96abc7fc01a8101de5257c76dde847199049fc6 (diff) | |
download | wireshark-b19ca06fcc12d3f9b28d14bf3718bf74dbbf5f58.tar.gz wireshark-b19ca06fcc12d3f9b28d14bf3718bf74dbbf5f58.tar.bz2 wireshark-b19ca06fcc12d3f9b28d14bf3718bf74dbbf5f58.zip |
tap-sctp: remove leak of sack and tsn (found by clang).
Change-Id: I829f117f8e19f60d34104730fbb0bc4504f231dd
Reviewed-on: https://code.wireshark.org/review/26434
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/tap-sctp-analysis.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c index 7103ec553d..681e317757 100644 --- a/ui/tap-sctp-analysis.c +++ b/ui/tap-sctp-analysis.c @@ -1105,7 +1105,6 @@ packet(void *tapdata _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const voi g_ptr_array_add(info->sort_sack2, tsn_s); info->n_sack_chunks_ep2++; } - } } } @@ -1120,6 +1119,10 @@ packet(void *tapdata _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const voi else if (info->direction == 2) info->tsn2 = g_list_prepend(info->tsn2, tsn); } + else + { + g_free(tsn); + } if (sackchunk == TRUE) { if (info->direction == 1) @@ -1127,6 +1130,10 @@ packet(void *tapdata _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const voi else if(info->direction == 2) info->sack1 = g_list_prepend(info->sack1, sack); } + else + { + g_free(sack); + } info->n_tvbs += sctp_info->number_of_tvbs; sctp_tapinfo_struct.sum_tvbs += sctp_info->number_of_tvbs; info = calc_checksum(sctp_info, info); |