* [PATCH BlueZ] media: Fix leaking endpoint in case of failure to register SEP
@ 2012-10-15 9:51 Luiz Augusto von Dentz
2012-10-15 10:13 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-10-15 9:51 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This can happen in case of AudioSink and/or AudioSource are disabled in
audio.conf.
---
audio/media.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/media.c b/audio/media.c
index 5c26035..f2b5b2f 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -769,7 +769,7 @@ static struct media_endpoint *media_endpoint_create(struct media_adapter *adapte
}
if (!succeeded) {
- g_free(endpoint);
+ media_endpoint_destroy(endpoint);
return NULL;
}
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] media: Fix leaking endpoint in case of failure to register SEP
2012-10-15 9:51 [PATCH BlueZ] media: Fix leaking endpoint in case of failure to register SEP Luiz Augusto von Dentz
@ 2012-10-15 10:13 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-10-15 10:13 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Mon, Oct 15, 2012, Luiz Augusto von Dentz wrote:
> This can happen in case of AudioSink and/or AudioSource are disabled in
> audio.conf.
> ---
> audio/media.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied. Thanks.
This finally fixed the leak I've been seeing for a long time. Btw, this
happens also with no audio.conf at all as the default is to disable
AudioSource, so it's a bit misleading to imply (as you do in your commit
message) that this would happen only because of something in audio.conf.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-15 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 9:51 [PATCH BlueZ] media: Fix leaking endpoint in case of failure to register SEP Luiz Augusto von Dentz
2012-10-15 10:13 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).