* in the stack.
*/
if (!opt_pd_annotations) {
- g_hash_table_insert(pd_ann_visible, g_strdup(di->inst_id),
+ g_hash_table_insert(pd_ann_visible, g_strdup(di->decoder->id),
g_slist_append(NULL, GINT_TO_POINTER(-1)));
}
if (di_prior) {
g_hash_table_remove(pd_ann_visible, di_prior->inst_id);
}
di_prior = di;
+ g_free(pd_name);
+ g_hash_table_destroy(pd_opthash);
+ g_hash_table_destroy(options);
+ pd_opthash = options = NULL;
}
if (pd_opthash)
g_hash_table_destroy(channels);
g_strfreev(pdtokens);
- g_free(pd_name);
return ret;
}
}
srd_inst_channel_set_all(di, channel_indices);
+ g_hash_table_destroy(channel_indices);
}
void map_pd_channels(struct sr_dev_inst *sdi)
if (!pd_ann_visible)
return;
- if (!g_hash_table_lookup_extended(pd_ann_visible, pdata->pdo->di->inst_id,
- NULL, (void **)&ann_list))
+ if (!g_hash_table_lookup_extended(pd_ann_visible, pdata->pdo->di->decoder->id,
+ NULL, (void **)&ann_list)) {
/* Not in the list of PDs whose annotations we're showing. */
return;
+ }
dec = pdata->pdo->di->decoder;
pda = pdata->data;