lascar-el-usb: fix memory leak

This fixes bug #630.
This commit is contained in:
Daniel Glöckner 2015-08-22 17:31:43 +02:00 committed by Uwe Hermann
parent 80e20c10e3
commit 96127d0fea
1 changed files with 2 additions and 0 deletions

View File

@ -436,6 +436,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf,
analog.unit = SR_UNIT_CELSIUS;
analog.data = temp;
sr_session_send(devc->cb_data, &packet);
g_slist_free(analog.channels);
}
ch = sdi->channels->next->data;
@ -445,6 +446,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf,
analog.unit = SR_UNIT_PERCENTAGE;
analog.data = rh;
sr_session_send(devc->cb_data, &packet);
g_slist_free(analog.channels);
}
g_free(temp);