X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fhameg-hmo%2Fprotocol.c;h=f534cb4705c07042dfbeb5da562870a950c5f990;hp=059ae4399cc612f241b6b5d0dff7e3e1f9ec6994;hb=14cb6aa40a26e12f24a28c66e6a8d6ba636c6281;hpb=4fff7b3c8a84a5593ddf780992355d9ebf434a90 diff --git a/src/hardware/hameg-hmo/protocol.c b/src/hardware/hameg-hmo/protocol.c index 059ae439..f534cb47 100644 --- a/src/hardware/hameg-hmo/protocol.c +++ b/src/hardware/hameg-hmo/protocol.c @@ -881,7 +881,6 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { if (data) g_byte_array_free(data, TRUE); - return TRUE; } @@ -927,7 +926,8 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) break; case SR_CHANNEL_LOGIC: if (sr_scpi_get_block(sdi->conn, NULL, &data) != SR_OK) { - g_free(data); + if (data) + g_byte_array_free(data, TRUE); return TRUE; }