Wireshark-commits: [Wireshark-commits] master 96acb62: Fix memleaks on interface refresh when extca
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 31 Jan 2016 10:49:05 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=96acb62c823f1c9bb0739593419998973fc6d8ea
Submitter: Roland Knall (rknall@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

96acb62 by Mikael Kanstrup (mikael.kanstrup@xxxxxxxxx):

    Fix memleaks on interface refresh when extcap configs exists
    
    If there are extcap interfaces present then each time the capture
    interfaces list is displayed or refreshed a number of extcap related
    allocations are leaked.
    
    Valgrind reports leaks like these:
    
    2,007 (144 direct, 1,863 indirect) bytes in 6 blocks are definitely lost in loss record 64,328 of 65,138
       at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0xA6D2610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0xA6E822D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0xA6C94F3: g_list_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0x44C9AF: search_cb (extcap.c:451)
       by 0x44C6FC: extcap_foreach (extcap.c:204)
       by 0x44CDFF: extcap_get_if_configuration (extcap.c:473)
       by 0x44CE3C: extcap_has_configuration (extcap.c:489)
       by 0x654356: InterfaceTree::display() (interface_tree.cpp:199)
       by 0x6547DF: InterfaceTree::getInterfaceList() (interface_tree.cpp:252)
       by 0xBFCF2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
       by 0x563F9A: WiresharkApplication::allSystemsGo() (wireshark_application.cpp:914)
       by 0x4478D9: main (wireshark-qt.cpp:1373)
    
    9,126 (432 direct, 8,694 indirect) bytes in 18 blocks are definitely lost in loss record 58,524 of 58,638
       at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0xA6D2610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0xA6E822D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0xA6C94F3: g_list_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
       by 0x44C9AF: search_cb (extcap.c:451)
       by 0x44C6FC: extcap_foreach (extcap.c:204)
       by 0x44CDFF: extcap_get_if_configuration (extcap.c:473)
       by 0x44CE3C: extcap_has_configuration (extcap.c:489)
       by 0x654356: InterfaceTree::display() (interface_tree.cpp:199)
       by 0xBFCF2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
       by 0x4A3214: MainWindow::on_actionCaptureRefreshInterfaces_triggered() (main_window_slots.cpp:3605)
       ...
    
    Change-Id: I9433b8e36813cbef9dca5ab08074e985793f4d0d
    Reviewed-on: https://code.wireshark.org/review/13617
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  27ff4ac   RLC LTE: fix dissection of RLC AM PDUs with odd number of 15 bits LI
    adds  96acb62   Fix memleaks on interface refresh when extcap configs exists


Summary of changes:
 extcap.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)