Skip to content

Commit c78fa9c

Browse files
fenugrecgsigh
authored andcommitted
siglent-sds: incorrect g_array_free call
Since we are not keeping the array's data, arg must be TRUE to free it. reported by Fr3ya on github as PR #207
1 parent 3147a7f commit c78fa9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hardware/siglent-sds/protocol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,10 @@ static int siglent_sds_get_digital(const struct sr_dev_inst *sdi, struct sr_chan
412412

413413
/* Clear the buffers to prepare for the new samples */
414414
if (ch->index < 8) {
415-
g_array_free(data_low_channels, FALSE);
415+
g_array_free(data_low_channels, TRUE);
416416
data_low_channels = g_array_new(FALSE, FALSE, sizeof(uint8_t));
417417
} else {
418-
g_array_free(data_high_channels, FALSE);
418+
g_array_free(data_high_channels, TRUE);
419419
data_high_channels = g_array_new(FALSE, FALSE, sizeof(uint8_t));
420420
}
421421

0 commit comments

Comments
 (0)