Re: crashing vpn properties (patch)



On Mon, 2007-12-10 at 16:23 -0600, Casey Harkins wrote:
> The crashes when working with vpn properties (not just openvpn) are the 
> result of using g_free() as the key_destroy_func. The keys being used 
> for the properties hash table are #define'ed constants and shouldn't be 
> free'ed. Attached is a one-liner that should fix this.
> 
> This should resolve RH bug #320941.

Actually, whenever anything stuffs stuff into that table it needs to
g_strdup() the key.  See update_one_secret() and copy_hash().
Otherwise, you'll leak the keys when freeing the hash.  So anything that
uses NMSettingVPNProperties (like the properties dialogs) also need to
g_strdup() the key.  I probably missed that when fixing up the VPN
properties hash.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]