From: Gerhard Sittig Date: Sun, 28 Jan 2018 17:58:19 +0000 (+0100) Subject: srzip: don't access non-existing option X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=11e3a56380a660b07a34150dcadda7723c0f65f9;p=libsigrok.git srzip: don't access non-existing option The srzip output module dropped support for the "filename" option in commit 37875f750614 on 2015-07-30, but still used to assign to slot options[0] which clobbers the array's sentinel. Remove those accesses to the non-existing option. --- diff --git a/src/output/srzip.c b/src/output/srzip.c index 6357a1c9..84938ad2 100644 --- a/src/output/srzip.c +++ b/src/output/srzip.c @@ -465,9 +465,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; } @@ -476,7 +473,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);