]> sigrok.org Git - libsigrok.git/commit
baylibre-acme: Properly free GErrors returned by g_file_get_contents()
authorLars-Peter Clausen <redacted>
Fri, 29 Apr 2016 08:25:18 +0000 (10:25 +0200)
committerLars-Peter Clausen <redacted>
Tue, 3 May 2016 19:23:22 +0000 (21:23 +0200)
commita64fec2b8ed14d6b14daca9a3552d4c5d89a9baa
tree234946f1eebbd28f6419e55d81550b4650068695
parent7b6072d3546ebec08f4bc7861d985c667c55e02f
baylibre-acme: Properly free GErrors returned by g_file_get_contents()

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.

Add the missing g_error_free() invocations to fix the issue.

Signed-off-by: Lars-Peter Clausen <redacted>
src/hardware/baylibre-acme/protocol.c