From be43cdfc41738a5bb75bff98428407259592d8f9 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 10 Oct 2016 10:36:22 +0200 Subject: [PATCH] fix crashing test --- tester/call_single_tester.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index 691f1dfb1..0ef27fe6e 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -1381,8 +1381,8 @@ static void call_with_custom_headers(void) { linphone_call_params_add_custom_header(params,"Weather","bad"); linphone_call_params_add_custom_header(params,"Working","yes"); - BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params)); - linphone_call_params_destroy(params); + if (!BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params))) goto end; + call_marie=linphone_core_get_current_call(marie->lc); call_pauline=linphone_core_get_current_call(pauline->lc); @@ -1419,7 +1419,9 @@ static void call_with_custom_headers(void) { ms_free(marie_remote_contact_header); end_call(pauline, marie); - + +end: + linphone_call_params_destroy(params); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); }