Diff between 065783d0a2ea96904a3e225913eaf49cbf363c83 and 6d98c73b9cd5d9773acdfaa797fc76fe87ef3332
Changed Files
| File | Additions | Deletions | Status |
| tools/l2cap-tester.c | +5 | -3 | modified |
Full Patch
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 802c0e4..df8f1bf 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -198,6 +198,11 @@ static void test_post_teardown(const void *test_data)
{
struct test_data *data = tester_get_data();
+ if (data->io_id > 0) {
+ g_source_remove(data->io_id);
+ data->io_id = 0;
+ }
+
hciemu_unref(data->hciemu);
data->hciemu = NULL;
}
@@ -206,9 +211,6 @@ static void test_data_free(void *test_data)
{
struct test_data *data = test_data;
- if (data->io_id > 0)
- g_source_remove(data->io_id);
-
free(data);
}