Diff between 7ff745c2bd0c2656a7022ee11c67c6d8dc8494a6 and 87ad4c66b934b1280bc8843589856313ef1bc912

Changed Files

File Additions Deletions Status
profiles/audio/transport.c +1 -3 modified

Full Patch

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 0ce94ba..922911c 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -220,9 +220,6 @@ void media_transport_destroy(struct media_transport *transport)
 	g_dbus_unregister_interface(btd_get_dbus_connection(), path,
 						MEDIA_TRANSPORT_INTERFACE);
 
-	if (transport->remote_endpoint)
-		g_free(transport->remote_endpoint);
-
 	g_free(path);
 }
 
@@ -1271,6 +1268,7 @@ static void media_transport_free(void *data)
 	if (transport->ops && transport->ops->destroy)
 		transport->ops->destroy(transport->data);
 
+	g_free(transport->remote_endpoint);
 	g_free(transport->configuration);
 	g_free(transport->path);
 	g_free(transport);