From: Philipp Marek Date: Tue, 21 Nov 2017 15:10:33 +0000 (+0100) Subject: hantek-dso: Fix a memory leak. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=16a1dca4ad817e7f19f7756f6d574c6bbe82cb51;p=libsigrok.git hantek-dso: Fix a memory leak. --- diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index d86eff61..9b754629 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -768,6 +768,8 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer) sr_dbg("End of frame, sending %d pre-trigger buffered samples.", devc->samp_buffered); send_chunk(sdi, devc->framebuf, devc->samp_buffered); + g_free(devc->framebuf); + devc->framebuf = NULL; /* Mark the end of this frame. */ packet.type = SR_DF_FRAME_END;