From: Joel Holdsworth Date: Thu, 15 Jun 2017 21:13:57 +0000 (-0600) Subject: dslogic: Don't leak the trigger transfers array X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5e23d42f070ec24325302761389bffae6c811303;p=libsigrok.git dslogic: Don't leak the trigger transfers array --- diff --git a/src/hardware/dslogic/protocol.c b/src/hardware/dslogic/protocol.c index 3606472e..982cb163 100644 --- a/src/hardware/dslogic/protocol.c +++ b/src/hardware/dslogic/protocol.c @@ -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.");