dslogic: Don't leak the trigger transfers array

This commit is contained in:
Joel Holdsworth 2017-06-15 15:13:57 -06:00 committed by Uwe Hermann
parent 5e7e327ac8
commit 5e23d42f07
1 changed files with 1 additions and 0 deletions

View File

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