X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fserial-dmm%2Fprotocol.c;fp=src%2Fhardware%2Fserial-dmm%2Fprotocol.c;h=99a7169424fd5aaa3c845db94301d1fbb8c7897a;hp=6128e493f66888bb97aab00e132095c441308c45;hb=145d794facd93b182e6c85d7613ce2e6d9a66d48;hpb=c35276dd92b948d0c8c71bd816a8a75453895e81 diff --git a/src/hardware/serial-dmm/protocol.c b/src/hardware/serial-dmm/protocol.c index 6128e493..99a71694 100644 --- a/src/hardware/serial-dmm/protocol.c +++ b/src/hardware/serial-dmm/protocol.c @@ -175,9 +175,9 @@ int receive_data(int fd, int revents, void *cb_data) if (revents == G_IO_IN) { /* Serial data arrived. */ - info = malloc(dmm->info_size); + info = g_malloc(dmm->info_size); handle_new_data(sdi, info); - free(info); + g_free(info); } else { /* Timeout; send another packet request if DMM needs it. */ if (dmm->packet_request && (req_packet(sdi) < 0))