Skip to contentSkip to conversation

hfpmodem: Fix g_at_chat leak

PATCH In review Frédéric Dalleau 2 participants 2 messages Aug 4, 2011 – Aug 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hfpmodem: Fix g_at_chat leak

---
 drivers/hfpmodem/call-volume.c          |    1 +
 drivers/hfpmodem/network-registration.c |    1 +
 drivers/hfpmodem/voicecall.c            |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/hfpmodem/call-volume.c +1 -0
index df83657..c0c4869 100644
@@ -206,6 +206,7 @@ static void hfp_call_volume_remove(struct ofono_call_volume *cv)
 
 	ofono_call_volume_set_data(cv, NULL);
 
+	g_at_chat_unref(vd->chat);
 	g_free(vd);
 }
 
drivers/hfpmodem/network-registration.c +1 -0
index 7d26424..6703885 100644
@@ -331,6 +331,7 @@ static void hfp_netreg_remove(struct ofono_netreg *netreg)
 
 	ofono_netreg_set_data(netreg, NULL);
 
+	g_at_chat_unref(nd->chat);
 	g_free(nd);
 }
 
drivers/hfpmodem/voicecall.c +1 -0
index 3c49870..9903db0 100644
@@ -1166,6 +1166,7 @@ static void hfp_voicecall_remove(struct ofono_voicecall *vc)
 
 	ofono_voicecall_set_data(vc, NULL);
 
+	g_at_chat_unref(vd->chat);
 	g_free(vd);
 }
 
Signature · 1 line
1.7.1
#1 lore raw

Hi Frédéric,

Quoted 6 lines · Frédéric Dalleau
---
 drivers/hfpmodem/call-volume.c          |    1 +
 drivers/hfpmodem/network-registration.c |    1 +
 drivers/hfpmodem/voicecall.c            |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

Patch has been applied. Thanks for spotting this one. This one is my fault since I introduced it during the hfpmodem refactoring.

Regards,
-Denis