Wireshark-commits: [Wireshark-commits] master 1675e0f: extcap: Fix memory leak in extcap_get_extcap
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 06 Nov 2019 07:44:25 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1675e0fe72e27c40ebc785600fc52871e87cfd42
Submitter: "Roland Knall <rknall@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

1675e0f by Vasil Velichkov (vvvelichkov@xxxxxxxxx):

    extcap: Fix memory leak in extcap_get_extcap_paths
    
    The path returned by get_persconffile_path needs to be freed.
    
    Direct leak of 64 byte(s) in 1 object(s) allocated from:
        #0 0x5653e6c98e06 in realloc (/home/vasko/sources/wireshark/build_clang/run/wireshark+0x2486e06)
        #1 0x7f5b697f2e7d in g_realloc gmem.c:164:16
        #2 0x7f5b69810016 in g_string_maybe_expand gstring.c:102:21
        #3 0x7f5b69810369  gstring.c:476:7
        #4 0x7f5b69810369 in g_string_insert_len gstring.c:424:1
        #5 0x7f5b697d808d in g_build_path_va gfileutils.c:1766:7
        #6 0x7f5b697d9518 in g_build_filename_va gfileutils.c:1987:9
        #7 0x7f5b697d9518 in g_build_filename gfileutils.c:2069:9
        #8 0x7f5b69bd0c28 in get_persconffile_path /home/vasko/sources/wireshark/wsutil/filesystem.c:1856:12
        #9 0x5653e8825f82 in extcap_get_extcap_paths /home/vasko/sources/wireshark/extcap.c:258:53
        #10 0x5653e8825f82 in extcap_run_all /home/vasko/sources/wireshark/extcap.c:449
        #11 0x5653e8825f82 in extcap_load_interface_list /home/vasko/sources/wireshark/extcap.c:2024
        #12 0x5653e7775356 in main /home/vasko/sources/wireshark/ui/qt/main.cpp:726:5
    
    Change-Id: I275d0ad6f06fbf3222c2d4ebef7f3079073404a0
    Reviewed-on: https://code.wireshark.org/review/34994
    Petri-Dish: Roland Knall <rknall@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Roland Knall <rknall@xxxxxxxxx>
    

Actions performed:

    from  3361109   QT/CLI: Remove limit for object export files
     add  1675e0f   extcap: Fix memory leak in extcap_get_extcap_paths


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