Wireshark-commits: [Wireshark-commits] master c33274d: wtap: fix leak in optionblock management.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 19 Apr 2016 23:00:10 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c33274dafad53f5f9126708065d2f7f486aa0e54
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c33274d by Dario Lombardo (lomato@xxxxxxxxx):

    wtap: fix leak in optionblock management.
    
    Found by valgrind:
    
    ==14298==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==14298==    by 0xA66C6AE: g_realloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
    ==14298==    by 0xA63BB32: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
    ==14298==    by 0xA63BEB7: g_array_append_vals (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
    ==14298==    by 0xA193252: wtap_optionblock_add_option (wtap_opttypes.c:352)
    ==14298==    by 0xA19361C: shb_create (wtap_opttypes.c:607)
    ==14298==    by 0xA192F96: wtap_optionblock_create (wtap_opttypes.c:126)
    ==14298==    by 0xA168784: wtap_open_offline (file_access.c:824)
    ==14298==    by 0x11D47C: cf_open (tshark.c:4194)
    ==14298==    by 0x117852: main (tshark.c:2183)
    
    et al.
    
    Change-Id: Ic16595ed3c12b9ed6c2813852ceb594c29ece929
    Reviewed-on: https://code.wireshark.org/review/15004
    Petri-Dish: Dario Lombardo <lomato@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  45a4ec8   TCP: fix was marked unused but was used [-Werror,-Wused-but-marked-unused]
    adds  c33274d   wtap: fix leak in optionblock management.


Summary of changes:
 wiretap/wtap_opttypes.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)