From: Bert Vermeulen Date: Sat, 2 Aug 2014 23:24:30 +0000 (+0200) Subject: output: Check options hash before destroying. X-Git-Tag: libsigrok-0.4.0~1173 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=706f482a95f669f722a40fc30488d67431553d1e;p=libsigrok.git output: Check options hash before destroying. --- diff --git a/src/output/output.c b/src/output/output.c index e8418391..64583953 100644 --- a/src/output/output.c +++ b/src/output/output.c @@ -264,7 +264,8 @@ SR_API const struct sr_output *sr_output_new(const struct sr_output_module *o, g_free(op); op = NULL; } - g_hash_table_destroy(new_opts); + if (new_opts) + g_hash_table_destroy(new_opts); return op; }