summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-10-15 11:51:27 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-10-15 13:10:41 +0300
commitd0f08e050a36fa6092ac151541f51b7d15768784 (patch)
tree6cbd150185cb8b43efc4a220d81a52265cd307e1
parent6f4d4e039001f7fa233b72d5022849f49db3d124 (diff)
downloadbluez-d0f08e050a36fa6092ac151541f51b7d15768784.tar.gz
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.
-rw-r--r--audio/media.c2
1 files changed, 1 insertions, 1 deletions
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;
}