- struct ctf_fs_ds_index *index = g_new0(struct ctf_fs_ds_index, 1);
-
- if (!index) {
- BT_COMP_LOG_CUR_LVL(BT_LOG_ERROR, log_level, self_comp, "Failed to allocate index");
- goto error;
- }
-
- index->entries = g_ptr_array_new_with_free_func((GDestroyNotify) g_free);
+ ctf_fs_ds_index *index = new ctf_fs_ds_index;
+ index->entries = g_ptr_array_new_with_free_func((GDestroyNotify) ctf_fs_ds_index_entry_destroy);