]> sigrok.org Git - libsigrok.git/commitdiff
dslogic: Don't leak the trigger transfers array
authorJoel Holdsworth <redacted>
Thu, 15 Jun 2017 21:13:57 +0000 (15:13 -0600)
committerUwe Hermann <redacted>
Mon, 19 Jun 2017 22:18:16 +0000 (00:18 +0200)
src/hardware/dslogic/protocol.c

index 3606472ec42a41a251001bdedbb5cf1d72ff9647..982cb1633ffa62aae431da5f7a70847fd7792c28 100644 (file)
@@ -924,6 +924,7 @@ static int start_transfers(const struct sr_dev_inst *sdi)
        size = get_buffer_size(devc);
        devc->submitted_transfers = 0;
 
+       g_free(devc->transfers);
        devc->transfers = g_try_malloc0(sizeof(*devc->transfers) * num_transfers);
        if (!devc->transfers) {
                sr_err("USB transfers malloc failed.");