]> sigrok.org Git - sigrok-cli.git/commit
sigrok-cli: Fix memory leak if we save the default output format to a file.
authorpoljar (Damir Jelić) <redacted>
Tue, 19 Nov 2013 10:28:09 +0000 (11:28 +0100)
committerBert Vermeulen <redacted>
Tue, 19 Nov 2013 10:40:36 +0000 (11:40 +0100)
commit30364883abef6a52180fc6244d79788298729137
tree180dbb582913e3c6b9772a122d73567a09f50cfc
parentf0f2c3f3d5627d5ac7c3cdceb43b0ccd8782319d
sigrok-cli: Fix memory leak if we save the default output format to a file.

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