g_free_byte_array accepts as the second argument a gboolean which determines if
the actual byte data should also be freed:
https://developer.gnome.org/glib/2.28/glib-Byte-Arrays.html#g-byte-array-free
If we pass a FALSE here the data should be freed with g_free(), instead just
pass TRUE and the data will be automatically freed.
---
session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/session.c b/session.c
index 82fea55..12033dc 100644
--- a/session.c
+++ b/session.c
@@ -440,7 +440,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
if (sr_session_save(opt_output_file, sdi, savebuf->data,
unitsize, savebuf->len / unitsize) !=
SR_OK)
g_critical("Failed to save session.");
- g_byte_array_free(savebuf, FALSE);
+ g_byte_array_free(savebuf, TRUE);
}
}
--
1.8.4.2
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel