]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/link-mso19/protocol.c
Some more g_try_*alloc() fixes.
[libsigrok.git] / src / hardware / link-mso19 / protocol.c
index fafd83c3b93b7a15a3488496d4600da9b737e9d3..11fa8a616f79960795983833e953122537128d93 100644 (file)
@@ -42,11 +42,7 @@ SR_PRIV int mso_send_control_message(struct sr_serial_dev_inst *serial,
        if (serial->fd < 0)
                goto ret;
 
-       if (!(buf = g_try_malloc(s))) {
-               sr_err("Failed to malloc message buffer.");
-               ret = SR_ERR_MALLOC;
-               goto ret;
-       }
+       buf = g_malloc(s);
 
        p = buf;
        memcpy(p, mso_head, sizeof(mso_head));