[PATCH BlueZ] media: Fix leaking endpoint in case of failure to register SEP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux