id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3585	improvement in lib/widget/widget-common/release_hotkey	lzsiga		"I'd like to suggest a little improvement in function lib/widget/widget-common/release_hotkey that might be useful in preventing/detecting potential ""double-free"" problems. This change is very limited, affects only two files: widget-common.h and widget-common.c.

header (lines 127-129)
{{{
/* release hotkey, free all mebers of hotkey_t */
void release_hotkey_ptr (hotkey_t *hotkey);
#define release_hotkey(hotkeystruct) release_hotkey_ptr(&(hotkeystruct))
}}}

program (lines 98-106)
{{{
void
release_hotkey_ptr (hotkey_t *hotkey)
{
#define MEMBER_FREE(m) if (hotkey->m) { g_free (hotkey->m); hotkey->m= NULL; }
    MEMBER_FREE (start);
    MEMBER_FREE (hotkey);
    MEMBER_FREE (end);
#undef MEMBER_FREE
}
}}}"	enhancement	closed	trivial		mc-core	master	wontfix	"""double free"""	lzsiga@…			no branch	
