URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=297a4ea7edd2df1c3dc389833259f16ff1478929
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark
Commits:
297a4ea by Peter Wu (peter@xxxxxxxxxxxxx):
pcapng: do not leak blocks
pcapng_open and pcapng_read have 'wblock' allocated on the stack, so if
they return, they do not have to set wblock.block to NULL.
pcapng_read_block always sets wblock->block to NULL and may initialize
it for SHB, IDB, NRB and ISB. Be sure to release the memory for IDB and
ISB. It is better to have more wtap_block_free calls on a NULL value
than missing them as this would be a memleak (on the other hand, do not
release memory that is stored elsewhere such as SHB and NRB).
Ping-Bug: 12790
Change-Id: I081f841addb36f16e3671095a919d357f4bc16c5
Reviewed-on: https://code.wireshark.org/review/17362
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
(cherry picked from commit 14312835c63a3e2ec9d311ed1ffee5285141f4f9)
Reviewed-on: https://code.wireshark.org/review/17462
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from f40ffe1 Qt: Clear open files list when clear recent menu
adds 297a4ea pcapng: do not leak blocks
Summary of changes:
wiretap/pcapng.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)