X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=0c16129f2b4102808c7edc103040c6243459a2b1;hb=3e7fb88f21d9b6d87652af2d988c83d8481592de;hp=591f708012d5555524b72f7cfae943ce7671ce04;hpb=d8fb599c679a6da64f28bcafce514558b786b6c7;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index 591f7080..0c16129f 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -665,6 +665,8 @@ SR_PRIV int lecroy_xstream_receive_data(int fd, int revents, void *cb_data) return SR_ERR; if (analog.num_samples == 0) { + g_free(analog.data); + /* No data available, we have to acquire data first. */ g_snprintf(command, sizeof(command), "ARM;WAIT;*OPC;C%d:WAVEFORM?", ch->index + 1); sr_scpi_send(sdi->conn, command);