Fix: Set data to NULL in hfpmodem drivers

This commit is contained in:
Zhenhua Zhang 2009-11-13 00:31:03 +08:00 committed by Denis Kenzior
parent 7600c4b3ac
commit 3003ebd066
2 changed files with 5 additions and 0 deletions

View File

@ -333,6 +333,8 @@ static void hfp_netreg_remove(struct ofono_netreg *netreg)
{
struct netreg_data *nd = ofono_netreg_get_data(netreg);
ofono_netreg_set_data(netreg, NULL);
g_free(nd);
}

View File

@ -514,6 +514,9 @@ static void hfp_voicecall_remove(struct ofono_voicecall *vc)
g_slist_foreach(vd->calls, (GFunc) g_free, NULL);
g_slist_free(vd->calls);
ofono_voicecall_set_data(vc, NULL);
g_free(vd);
}