]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/protocol.c
Various key lists: Add reminders of what needs updates upon changes.
[libsigrok.git] / src / hardware / serial-dmm / protocol.c
index 6128e493f66888bb97aab00e132095c441308c45..2e092533954250932a227008e75bc5e7b0d5ac2e 100644 (file)
@@ -21,9 +21,8 @@
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
-#include <errno.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
@@ -175,9 +174,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))