Devices for the deree-de5000 driver do have additional data attached to it
that needs to be freed when the device is freed. While the driver gets it
right for the cleanup() callback it does not implement a dev_clear()
callback, so the default dev_clear() implementation is used which will not
free t
std_init() allocates a drv_context struct which needs to be freed by the
driver in its cleanup struct. But the vast majority of drivers does never
does this causing memory leaks.
Instead of addressing the issue by manually adding code to free the struct
to each driver introduce a new helper functi
Every single hardware driver has the very same implementation of the
dev_list() callback. Put this into a helper function in the standard helper
library and use it throughout the drivers. This reduces boiler-plate code
by quite a bit.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent-dm
Hi,
This series fixes a large set of memory leaks that can be observed when
scanning for devices. Some of these leaks are driver specific and are fixed
in their respective drivers. But there is also one leak that is systematic.
Most drivers fail to free the drv_context struct that is allocated in
The beaglelogic has an open-coded version of std_dev_clear(), replace it
with std_dev_clear().
Signed-off-by: Lars-Peter Clausen
---
src/hardware/beaglelogic/api.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/src/hardware/beaglelogic/api.c b/src/hardwa
Devices for the scpi-pps driver do have additional data attached to it that
needs to be freed when the device is freed. While the driver gets it right
for the cleanup() callback it does not for the dev_clear() callback. This
will cause memory leaks when sr_dev_clear() is called for this driver.
To
If a driver does not implement a dev_clear() callback the core will
automatically call std_dev_clear(di, NULL). Remove all driver dev_clear()
implementations that are identical to default. This reduces the amount of
boiler-plate code.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/arachnid-l
Devices for the demo driver do have additional data attached to it that
needs to be freed when the device is freed. While the driver gets it right
for the cleanup() callback it does not implement a dev_clear() callback, so
the default dev_clear() implementation is used which will not free the
addit
When g_file_get_contents() encounters an error a new GError will be
allocated and passed back to the application. The application is
responsible for freeing this GError.
The baylibre-acme driver currently does not do this and as a result leaks
memory during the scan process when no device is found
Make sure to free the FTDI device list and the FTDI context in scan_all()
otherwise memory leaks can be observed. Also make sure to free the FTDI
context in scan_device() on the error path.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/ftdi-la/api.c | 4
1 file changed, 4 insertions(+)
On Sun, Apr 24, 2016 at 03:46:17PM +0200, Stefan Bruens wrote:
> Hi folks,
>
> another round of patches, available at:
>
> https://github.com/StefanBruens/libsigrok.git for_upstream_20160424
>
> [...]
>
> [3] The equality check is exact, but requires int64 -> __int_128
> multiplication. This is
11 matches
Mail list logo