From d0f08e050a36fa6092ac151541f51b7d15768784 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 15 Oct 2012 11:51:27 +0200 Subject: media: Fix leaking endpoint in case of failure to register SEP 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 c88afc00e..1b811bd1c 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; } -- cgit v1.2.1