]> sigrok.org Git - libsigrok.git/commitdiff
serial-dmm: Use g_malloc()/g_free().
authorUwe Hermann <redacted>
Sat, 21 Mar 2015 17:46:00 +0000 (18:46 +0100)
committerUwe Hermann <redacted>
Sat, 21 Mar 2015 17:46:00 +0000 (18:46 +0100)
src/hardware/serial-dmm/protocol.c

index 6128e493f66888bb97aab00e132095c441308c45..99a7169424fd5aaa3c845db94301d1fbb8c7897a 100644 (file)
@@ -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))