summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/headset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c
index 7d5fb935..8545ae22 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -792,6 +792,16 @@ int telephony_terminate_call_rsp(void *telephony_device,
static int terminate_call(struct audio_device *device, const char *buf)
{
+ if (ag.number) {
+ g_free(ag.number);
+ ag.number = NULL;
+ }
+
+ if (ag.ring_timer) {
+ g_source_remove(ag.ring_timer);
+ ag.ring_timer = 0;
+ }
+
telephony_terminate_call_req(device);
return 0;