Use the appropriate glib function to free memory (byte array).
This fixes bug #1324.
if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
if (data)
g_byte_array_free(data, TRUE);
if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
if (data)
g_byte_array_free(data, TRUE);
break;
case SR_CHANNEL_LOGIC:
if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
break;
case SR_CHANNEL_LOGIC:
if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) {
+ if (data)
+ g_byte_array_free(data, TRUE);