X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.c;h=26dac0cb037f34de3a8e370bc2d74a99285a799d;hp=3e15d3760543a7ab3da9332a356c5dd8eae7812d;hb=4da62209ddfa3aad12678c7141c19e9c3e8419c1;hpb=4fad41a8a4f3e7494a935463e3172cdb4a0ff93f diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 3e15d376..26dac0cb 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -1380,8 +1380,6 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) (void)fd; (void)revents; - data = NULL; - if (!(sdi = cb_data)) return TRUE; @@ -1410,6 +1408,7 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) */ switch (ch->type) { case SR_CHANNEL_ANALOG: + data = NULL; if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { if (data) g_byte_array_free(data, TRUE); @@ -1442,6 +1441,7 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) data = NULL; break; case SR_CHANNEL_LOGIC: + data = NULL; if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { if (data) g_byte_array_free(data, TRUE);