if (!ch->enabled)
continue;
+ s = NULL;
switch (ch->type) {
case SR_CHANNEL_LOGIC:
s = g_strdup_printf("probe%d", ch->index + 1);
index++;
break;
}
- g_key_file_set_string(meta, devgroup, s, ch->name);
- g_free(s);
+ if (s) {
+ g_key_file_set_string(meta, devgroup, s, ch->name);
+ g_free(s);
+ }
}
metabuf = g_key_file_to_data(meta, &metalen, NULL);
static const struct sr_option *get_options(void)
{
- if (!options[0].def)
- options[0].def = g_variant_ref_sink(g_variant_new_string(""));
-
return options;
}
struct out_context *outc;
outc = o->priv;
- g_variant_unref(options[0].def);
g_free(outc->analog_index_map);
g_free(outc->filename);
g_free(outc);