projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b77d65
)
handsfree-audio: Free agent when exiting
author
Claudio Takahasi
<claudio.takahasi@openbossa.org>
Wed, 20 Feb 2013 21:55:48 +0000
(18:55 -0300)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 21 Feb 2013 03:23:01 +0000
(21:23 -0600)
Free agent allocated resources when oFono exits.
src/handsfree-audio.c
patch
|
blob
|
history
diff --git
a/src/handsfree-audio.c
b/src/handsfree-audio.c
index
499e0de
..
28053b4
100644
(file)
--- a/
src/handsfree-audio.c
+++ b/
src/handsfree-audio.c
@@
-47,6
+47,14
@@
struct agent {
static struct agent *agent = NULL;
+static void agent_free(struct agent *agent)
+{
+ g_free(agent->owner);
+ g_free(agent->path);
+ g_free(agent->codecs);
+ g_free(agent);
+}
+
static DBusMessage *am_get_cards(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
@@
-127,4
+135,7
@@
void __ofono_handsfree_audio_manager_cleanup(void)
{
g_dbus_unregister_interface(ofono_dbus_get_connection(), "/",
HFP_AUDIO_MANAGER_INTERFACE);
+
+ if (agent)
+ agent_free(agent);
}