]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/agilent-dmm/api.c
Some more g_try_*alloc() fixes.
[libsigrok.git] / src / hardware / agilent-dmm / api.c
index 19a4144cca2aed4ea75df880087be1767ae7ace6..e8ef427b7cc1951ca03797d542c1937697ebaf58 100644 (file)
@@ -122,10 +122,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        }
 
        len = 128;
-       if (!(buf = g_try_malloc(len))) {
-               sr_err("Serial buffer malloc failed.");
-               return NULL;
-       }
+       buf = g_malloc(len);
        serial_readline(serial, &buf, &len, 250);
        if (!len)
                return NULL;