summaryrefslogtreecommitdiffstats
path: root/drivers/isimodem/voicecall.c
diff options
context:
space:
mode:
authorAki Niemi <aki.niemi@nokia.com>2010-10-19 11:28:06 +0300
committerAki Niemi <aki.niemi@nokia.com>2010-10-19 15:06:35 +0300
commit255782f8c2ff64991b362fb0e0554bd2adb7069e (patch)
tree86d891e0259255cc78f6344da69bbb33ad5a7b0c /drivers/isimodem/voicecall.c
parentfd74feac0d7c5bbba4653b0b5c43c458c6874971 (diff)
downloadofono-255782f8c2ff64991b362fb0e0554bd2adb7069e.tar.bz2
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.
Diffstat (limited to 'drivers/isimodem/voicecall.c')
-rw-r--r--drivers/isimodem/voicecall.c10
1 files changed, 6 insertions, 4 deletions
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 = {