From e9f12d76208a86ffb19469916a9e24966a98d744 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 11 Apr 2011 17:48:11 -0500 Subject: voicecall: fix to sim ecc free logic Correct copy paste mistakes and a slight logic oversight --- src/voicecall.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/voicecall.c b/src/voicecall.c index eaeec28b..9878050b 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -2225,10 +2225,13 @@ static void free_sim_ecc_numbers(struct ofono_voicecall *vc, gboolean old_only) * Free the currently being read EN list, just in case the * we're still reading them */ - if (old_only == FALSE && vc->new_sim_en_list) { - g_slist_foreach(vc->sim_en_list, (GFunc) g_free, NULL); - g_slist_free(vc->sim_en_list); - vc->sim_en_list = NULL; + if (old_only == FALSE) { + if (vc->new_sim_en_list) { + g_slist_foreach(vc->new_sim_en_list, (GFunc) g_free, + NULL); + g_slist_free(vc->new_sim_en_list); + vc->new_sim_en_list = NULL; + } vc->flags &= ~VOICECALL_FLAG_SIM_ECC_READY; } -- cgit v1.2.3