From: Uwe Hermann Date: Sat, 21 Mar 2015 17:46:00 +0000 (+0100) Subject: serial-dmm: Use g_malloc()/g_free(). X-Git-Tag: libsigrok-0.4.0~580 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=145d794facd93b182e6c85d7613ce2e6d9a66d48;p=libsigrok.git serial-dmm: Use g_malloc()/g_free(). --- 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))