The srzip output module's get_options() routine used to pre-set the
default for an option which no longer existed, the "filename" setting
was removed in a previous commit.  The cleanup() routine undid the
previous allocation.

Resource allocation was balanced, the data wasn't used, so the issue did
not harm.  The all-zero termination of the options[] table was lost, but
that seems to not have harmed either.

This commit removes the allocation/release logic.  The essentially empty
get_options() routine remains, as it is required for registration.

Fixes: 37875f750614 "output/srzip: Use sr_output->filename instead of option"

Signed-off-by: Gerhard Sittig <gerhard.sit...@gmx.net>
---
 src/output/srzip.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/output/srzip.c b/src/output/srzip.c
index 43dbd16b0a05..0b398ddd0501 100644
--- a/src/output/srzip.c
+++ b/src/output/srzip.c
@@ -461,8 +461,6 @@ static struct sr_option options[] = {
 
 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;
 }
@@ -472,7 +470,6 @@ static int cleanup(struct sr_output *o)
        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);
-- 
1.9.1

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to