mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 01:00:19 +00:00
Use glib for all allocations
- Removes need to check for malloc failure - Removes need for NULL checks on free - Adds checks for integer overflows - Removes some extra memset calls - Removes chance of mixing libc and glib malloc/free
This commit is contained in:
@@ -1684,9 +1684,8 @@ setup_snd_changed_cb (GtkEntry *ent, GtkTreeView *tree)
|
||||
return;
|
||||
|
||||
/* get the new sound file */
|
||||
if (sound_files[n])
|
||||
free (sound_files[n]);
|
||||
sound_files[n] = strdup (gtk_entry_get_text (GTK_ENTRY (ent)));
|
||||
g_free (sound_files[n]);
|
||||
sound_files[n] = g_strdup (gtk_entry_get_text (GTK_ENTRY (ent)));
|
||||
|
||||
/* update the TreeView list */
|
||||
store = (GtkListStore *)gtk_tree_view_get_model (tree);
|
||||
|
||||
Reference in New Issue
Block a user