Wireshark-commits: [Wireshark-commits] master-2.2 03b5dfe: packet-k12: Fix small memory leak

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 21 Jul 2018 17:33:56 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=03b5dfe4b56ce59cf044068223fddea4a0c5f260
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

03b5dfe by Vasil Velichkov (vvvelichkov@xxxxxxxxx):

    packet-k12: Fix small memory leak
    
    Use g_strsplit/g_strfreev instead of wmem_strsplit/wmem_free because in
    wmem_strutil.h the wmem_strsplit is documented not to be used with a
    NULL alocator.
    
    5 bytes in 1 blocks are definitely lost in loss record 63 of 9,354
       at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
       by 0x4E8D3C5: g_malloc (gmem.c:99)
       by 0x8214317: wmem_alloc (wmem_core.c:37)
       by 0x8219227: wmem_strdup (wmem_strutl.c:41)
       by 0x8219AC1: wmem_strsplit (wmem_strutl.c:272)
       by 0x749E3C9: protos_chk_cb (packet-k12.c:363)
    
    5 bytes in 1 blocks are definitely lost in loss record 64 of 9,354
       at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
       by 0x4E8D3C5: g_malloc (gmem.c:99)
       by 0x8214317: wmem_alloc (wmem_core.c:37)
       by 0x8219227: wmem_strdup (wmem_strutl.c:41)
       by 0x8219AC1: wmem_strsplit (wmem_strutl.c:272)
       by 0x749E24A: k12_copy_cb (packet-k12.c:327)
    
    Change-Id: I994769d17c87ed1d4f620379a2502452f48d80a5
    Reviewed-on: https://code.wireshark.org/review/28779
    Reviewed-by: Dario Lombardo <lomato@xxxxxxxxx>
    Petri-Dish: Dario Lombardo <lomato@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Reviewed-on: https://code.wireshark.org/review/28790
    

Actions performed:

    from  46f86f6   Extcap programs must write to the packet pipe in binary mode.
    adds  03b5dfe   packet-k12: Fix small memory leak


Summary of changes:
 epan/dissectors/packet-k12.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)