isimodem: fix GPRS context removal

This commit is contained in:
Mika Liljeberg 2010-12-03 10:52:19 +02:00 committed by Aki Niemi
parent a044bc7880
commit ae27b69769
1 changed files with 9 additions and 1 deletions

View File

@ -604,7 +604,15 @@ static void isi_gprs_context_remove(struct ofono_gprs_context *gc)
if (cd == NULL)
return;
reset_context(cd);
if (cd->reset)
g_source_remove(cd->reset);
if (cd->pipe != NULL)
g_isi_pipe_destroy(cd->pipe);
if (cd->pep != NULL)
g_isi_pep_destroy(cd->pep);
g_isi_client_destroy(cd->client);
g_free(cd);
}