From 7058a9b8924047b6c3066e80397dcb789e10c9c4 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 8 Sep 2013 19:59:05 +0200 Subject: [PATCH] Fix issue with optional PD probes. Running (or showing info about) PDs with optional probes was not working and causing segfaults. The reason was a g_slist_concat() call that was applied to a list, whereas it needs to be applied to a copy of the list. This fixes #138. --- sigrok-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sigrok-cli.c b/sigrok-cli.c index 71c35b7..8521b95 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1014,7 +1014,7 @@ static int probes_to_gvar(struct srd_decoder *dec, GHashTable *hash, (GDestroyNotify)g_variant_unref); all_probes = g_slist_copy(dec->probes); - all_probes = g_slist_concat(all_probes, dec->opt_probes); + all_probes = g_slist_concat(all_probes, g_slist_copy(dec->opt_probes)); for (l = all_probes; l; l = l->next) { p = l->data; if (!(val_str = g_hash_table_lookup(hash, p->id))) -- 2.30.2