From 255782f8c2ff64991b362fb0e0554bd2adb7069e Mon Sep 17 00:00:00 2001 From: Aki Niemi Date: Tue, 19 Oct 2010 11:28:06 +0300 Subject: isimodem: Fix request cleanup code Adds a check for when the driver is being removed, in which case no new ISI requests should be generated. --- drivers/isimodem/voicecall.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/isimodem/voicecall.c') diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c index 6e7aa0ef..82f7eef1 100644 --- a/drivers/isimodem/voicecall.c +++ b/drivers/isimodem/voicecall.c @@ -1303,10 +1303,12 @@ static void isi_voicecall_remove(struct ofono_voicecall *call) { struct isi_voicecall *data = ofono_voicecall_get_data(call); - if (data) { - g_isi_client_destroy(data->client); - g_free(data); - } + if (!data) + return; + + ofono_voicecall_set_data(call, NULL); + g_isi_client_destroy(data->client); + g_free(data); } static struct ofono_voicecall_driver driver = { -- cgit v1.2.3