From b6b6ab1e511a7cb04004099bd149fb9823cf1493 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Mon, 24 Feb 2014 15:25:16 +0200 Subject: [PATCH] unit/avrcp: Refactor tests to use destroy_context() --- unit/test-avrcp.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c index 381e7cbbc..e9fe7e306 100644 --- a/unit/test-avrcp.c +++ b/unit/test-avrcp.c @@ -246,15 +246,7 @@ static void execute_context(struct context *context) { g_main_loop_run(context->main_loop); - if (context->source > 0) - g_source_remove(context->source); - - avrcp_shutdown(context->session); - - g_main_loop_unref(context->main_loop); - - test_free(context->data); - g_free(context); + destroy_context(context); } static void test_server(gconstpointer data) -- 2.47.3