ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 44558: /trunk/epan/dissectors/ /trun

Date: Sat, 18 Aug 2012 11:02:01 -0400 (EDT)
Burned by the ASN.1 compiler again (I'll eventually learn to double-check the top of a dissector file when looking for general improvements with dissectors).  However, I think the better fix would be to make the key session-scope_allocated as well.  That was just an oversight on my part (apart from not modifying the template file).  I'll use this as an excuse to get better acquainted with the ASN.1 compiler and provide that fix.
-----Original Message-----
From: Guy Harris <guy@xxxxxxxxxxxx>
To: wireshark-dev <wireshark-dev@xxxxxxxxxxxxx>
Sent: Sat, Aug 18, 2012 2:24 am
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 44558: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-ansi_map.c packet-ansi_tcap.c


On Aug 17, 2012, at 7:54 PM, mmann@xxxxxxxxxxxxx wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44558
> 
> User: mmann
> Date: 2012/08/17 07:54 PM
> 
> Log:
> Use capture scoped memory for hash table functionality
> 
> Directory: /trunk/epan/dissectors/
>  Changes    Path                  Action
>  +1 -2      packet-ansi_map.c     Modified
>  +1 -2      packet-ansi_tcap.c    Modified

This broke the build, because it left behind, in packet-ansi_tcap.c, a static 
routine to free up the key and value of the elements in a hash table but got rid 
of the code that resulted in that routine being called.

In addition, it added a memory leak, as, while session-scope-allocated memory 
was used for the value, the key was g_strdup()ed, and needed to be freed, so the 
routine in question needed to be called - it just needed to be changed not to 
free the value.

I've checked in a fix.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe