]> sigrok.org Git - sigrok-cli.git/commitdiff
Don't leak GVariant.
authorBert Vermeulen <redacted>
Thu, 9 Jan 2014 15:48:17 +0000 (16:48 +0100)
committerBert Vermeulen <redacted>
Thu, 9 Jan 2014 15:48:17 +0000 (16:48 +0100)
session.c

index 6f900853be27b7d2cc99da10ed9fccf51e43a1ed..4a31c42f13803be8572f36e1a121d4945d612458 100644 (file)
--- a/session.c
+++ b/session.c
@@ -635,6 +635,7 @@ void run_session(void)
                        /* The device has no compression, or compression is turned
                         * off, and publishes its sample memory size. */
                        max_samples = g_variant_get_uint64(gvar);
+                       g_variant_unref(gvar);
                        if (limit_samples > max_samples) {
                                g_critical("The device can store only %"PRIu64
                                                " samples with the current settings.", max_samples);