From 96127d0feaf7333fba880c5bcf1267de6360e6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Sat, 22 Aug 2015 17:31:43 +0200 Subject: [PATCH] lascar-el-usb: fix memory leak This fixes bug #630. --- src/hardware/lascar-el-usb/protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hardware/lascar-el-usb/protocol.c b/src/hardware/lascar-el-usb/protocol.c index ba60fe3b..bccf7b6a 100644 --- a/src/hardware/lascar-el-usb/protocol.c +++ b/src/hardware/lascar-el-usb/protocol.c @@ -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);