summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hfpmodem/voicecall.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index a132243a..f0445520 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -161,6 +161,7 @@ static void release_with_status(struct ofono_voicecall *vc, int status)
struct voicecall_data *vd = ofono_voicecall_get_data(vc);
GSList *p = NULL;
GSList *c = vd->calls;
+ GSList *t;
struct ofono_call *call;
while (c) {
@@ -179,7 +180,9 @@ static void release_with_status(struct ofono_voicecall *vc, int status)
else
vd->calls = c->next;
- g_slist_free_1(c);
+ t = c;
+ c = c->next;
+ g_slist_free_1(t);
}
}