On Tue, 2020-07-28 at 14:58 +0200, milan hauth wrote:
>
> hello world
>
> when using the (default) output module "analog"
> sigrok-cli crashes with
> g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
> and i need "stty echo" to restore my terminal, cos clear_anykey() is not 
> called
>
> [ ... ]
>
> to avoid the double free, i added
>
> ```
>   if (options[0].def != NULL) {
>     g_variant_unref(options[0].def);
>     options[0].def = NULL;
>   }
>
>   if (options[0].values != NULL) {
>     g_slist_free_full(options[0].values, (GDestroyNotify)g_variant_unref);
>     options[0].values = NULL;
>   }
> ```
>
> maybe there is a more "glib way", but this works for me

Thank you for looking, and for coming up with the fix. Since you
did that work, I wanted to give you more than a Submitted-By:
attribution. So I created a commit to make you the author and get
the recognition. Hope that's OK for you.

https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff;h=588295b8b9cd9b3c7e67ccd3bfd74e05c513c0fb


virtually yours
Gerhard Sittig
--
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to