string (and pass g_free to g_hash_table_new_full to free it).
This means callers don't have to worry about the scope of the memory they pass
in, and fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9296
svn path=/trunk/; revision=52977
dtbl_entry->initial = dtbl_entry->current;
/* do the table insertion */
dtbl_entry->initial = dtbl_entry->current;
/* do the table insertion */
- g_hash_table_insert( sub_dissectors->hash_table, (gpointer)pattern,
+ g_hash_table_insert( sub_dissectors->hash_table, (gpointer)g_strdup(pattern),
(gpointer)dtbl_entry);
/*
(gpointer)dtbl_entry);
/*
dtbl_entry->current = handle;
/* do the table insertion */
dtbl_entry->current = handle;
/* do the table insertion */
- g_hash_table_insert( sub_dissectors->hash_table, (gpointer)pattern,
+ g_hash_table_insert( sub_dissectors->hash_table, (gpointer)g_strdup(pattern),
case FT_STRINGZ:
sub_dissectors->hash_table = g_hash_table_new_full( g_str_hash,
g_str_equal,
case FT_STRINGZ:
sub_dissectors->hash_table = g_hash_table_new_full( g_str_hash,
g_str_equal,