diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-04-11 17:48:11 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-04-11 17:48:11 -0500 |
commit | e9f12d76208a86ffb19469916a9e24966a98d744 (patch) | |
tree | 6dc950f12d519aced636b5b738fc867dd5f29503 /src/voicecall.c | |
parent | 857d2dfca8c0f6ce718ba0bb277bab03f856c032 (diff) | |
download | ofono-e9f12d76208a86ffb19469916a9e24966a98d744.tar.bz2 |
voicecall: fix to sim ecc free logic
Correct copy paste mistakes and a slight logic oversight
Diffstat (limited to 'src/voicecall.c')
-rw-r--r-- | src/voicecall.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; } |